Dear All
I am starting to explore Elm. I have read the tutorials and played with the demos. Now I am trying to write a http/json client to consume an API. I thought I'd start with a simple GET, and to base a first module on the random cat gif demo.
Result, and problem, so far: the overall flow seems to work properly, but the get json part seems to be returning an error. Please can anybody help with:
(a) Why is it returning an error?
(b) How can I see what the error is, as it is hidden behind layers of Effect, Task, Maybe, etc.? For example, is there a convenient way to work with http requests in the repl?
The relevant Elm module is at this gist:
https://gist.github.com/llaisdy/200c2e770621b42d214fThe module is a copy of RandomCatGif.elm, in example 5 of the Elm architecture tutorial.
Instead of GETting a cat gif, I am GETting a "topic", a json object like this:
{"id": 5, "name": "Mars", "subtitle": "Fourth Planet", description: "bla bla bla ..."}
The symptom when running the module (with example 5's Main.elm) is that the errorTopic is being shown in the view, leading me to believe that the json decoder in decodeUrl is not working properly.
Any pointers gratefully received.
With thanks and best wishes
Ivan