cylc / cylc-ui

Web app for monitoring and controlling Cylc workflows
https://cylc.github.io
GNU General Public License v3.0
37 stars 27 forks source link

error handling: Network error #329

Open oliver-sanders opened 4 years ago

oliver-sanders commented 4 years ago

Address the error component of #111

Handle:

Issues with communication to the UI Server typically manifest in the somewhat cryptic:

Network error: JSON.parse: unexpected character at line 4 column 1 of the JSON data 

Presumably the error returned isn't valid JSON, we should catch the JSON.parse error so we can present / handle the actual error properly.

Pull requests welcome!

kinow commented 4 years ago

+1 I've been waiting for the websockets to fix this one. Related to #93

The idea would be to have an indicator when the server is offline. Apache Jena's Fuseki, Riot WebIM, and other projects have a similar feature.

kinow commented 4 years ago

@oliver-sanders not sure if the network connectivity indicator is enough to close this? Or should we do something else in case of network errors?

oliver-sanders commented 4 years ago

It solves point 1, I think we could do with handling GraphQL errors better though.

kinow commented 4 years ago

It solves point 1, I think we could do with handling GraphQL errors better though.

Related issue from Cylc UI Server: https://github.com/cylc/cylc-uiserver/issues/68