jsonhero-web
jsonhero-web copied to clipboard
Improve error handling
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.
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