IPFS-aware error page: improve UX when gateway is offline
Recovery from dead public gateways was introduced in #640.
What about scenarios when local gateway goes offline?
Current UX: error page provided by the browser
Right now, opening http://docs.ipfs.io.ipns.localhost:8080 when node is offline ends up with a generic error:
I believe we could improve UX of errors like this.
Improvement: custom error page aware of IPFS options
We should introduce a custom error page tho, to improve UX AND to give user a final say if they choose to start local node and retry, load from original server (if DNSLink), or a public gateway instead.
Custom error page could be used in all recovery contexts (when local node is offline, but also when remote server is down, but has DNSLink).
@lidel I can certainly stub out a custom error page, but how tough would implementation of this be? I don't want to expose a rabbit hole.
@jessicaschilling in this case it should be relatively easy to wire it up :crossed_fingers: , in broad strokes:
we would add code in ipfs-request.js / onErrorOccured handler to check if failed request was for custom gateway defined in Preferences or a DNSLink website, and if so, open a static page, passing the failed URL after #, so the error page would read original URL via window.location.hash
If you stub the page and open a PR with it, I can block some time to wire it up.
https://github.com/ipfs-shipyard/ipfs-companion/pull/920 will close this once merged.
