jsonhero-web icon indicating copy to clipboard operation
jsonhero-web copied to clipboard

Improve error handling

Open azzzy opened this issue 1 year ago • 0 comments

When JSON Hero fails to fetch a json for some reason it throws an error, which is outside of any catch/error boundary. In this case safeFetch returns a response with HTTP status 520 send from the remote server.

Screenshot 2024-06-01 at 16 24 16

The first commit fixes this problem: fix: don't try to access the title if doc is undefined

The second adds the display of the actual errors coming from safeFetch: fix: show the fetch errors when thrown, instead of hardcoded 404

azzzy avatar Jun 01 '24 13:06 azzzy