Closed jbothma closed 5 years ago
The flow as I see it:
Now, if that is correct, I am missing a few bits:
fetch
API docs and our downloaders, nothing seems to be the right waycatch
the throw
in the viewer downloader, it breaks the flow down the line, as some other things (getJSON()
) seem to rely on it not returning an error?At the moment I don't see how the messages in babbage-ui could be extended to include the error payload, probably parsed. It's annoying, as I can see them being used throughout the code, however my attempts to extend them were not successful.
I feel like I'm spiraling and in the need of help.
Development so far:
All the components have to catch that error and emit it further. They don't work the same way, but ultimately they all end up doing some basic promise chains. The suggested implementation adds a new flag and conditionally sets the error message within the scope of their directives so it can be shown in templates.
The tricky part was following up on the promise chain, and throwing in the right places to help the server error reach the template.
Corresponding PRs sent:
I suggest you show a message like "Something went wrong" and if possible what they can do to rectify or investigate.
I tend to think a non-scary notice that something went wrong is more useful to users than making it appear like everything's ok but for some puzzling reason you don't get the expected outcome.
In this case there was a server error because of another issue which I'll raise in a separate bug.