# Locating a server bug: debugging and the debugger tool for beginners

**URL:** <https://discourse.elm-lang.org/t/locating-a-server-bug-debugging-and-the-debugger-tool-for-beginners/9647>\
**Category:** Learn\
**Created:** [February 9, 2024, 1:35pm UTC](https://discourse.elm-lang.org/t/locating-a-server-bug-debugging-and-the-debugger-tool-for-beginners/9647 "2024-02-09T13:35:23Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![badlydrawnrob](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@badlydrawnrob](https://discourse.elm-lang.org/u/badlydrawnrob)\
**Post date:** [February 9, 2024, 7:51pm UTC](https://discourse.elm-lang.org/t/locating-a-server-bug-debugging-and-the-debugger-tool-for-beginners/9647/5 "2024-02-09T19:51:58Z")

</div>

Thanks for the detailed feedback, I’ll have to distill those pointers down and get used to slightly larger programs. I’m starting to struggle to grasp concepts a bit — I think finding other examples/tutorials helps.

I found another great example of `Http.get` with a simple string at [Beginning Elm](https://elmprogramming.com/fetching-data-using-get.html). **I think it helps having each functionality isolated so you can properly see what’s going on.**

That tutorial also has a [problem with `cors`](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) — even though you’re serving both servers on localhost — but thankfully you can change the heading returned by the server with `--cors` flag to allow it.

> [@lydell](#):
>
> ```auto
> GotPhotos (Err error) ->
> let
> _ = Debug.log "Error" error
> in
> ( { model | status = Errored "Server error!" }, Cmd.none )
> 
> ```

So `NetworkError` could be anything then! I like the fact that you can keep the `Debug.log` separate in a `let`. Nice.

I’m sure I’ll learn more about error-checking and security either in the book, or further research.

Thanks so much!

---

_[View the full topic](https://discourse.elm-lang.org/t/locating-a-server-bug-debugging-and-the-debugger-tool-for-beginners/9647)._
