ipfs-companion icon indicating copy to clipboard operation
ipfs-companion copied to clipboard

IPFS-aware error page: improve UX when gateway is offline

Open lidel opened this issue 6 years ago • 3 comments

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:

2019-10-30-114745_905x465_scrot

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 avatar Oct 30 '19 11:10 lidel

@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 avatar Aug 28 '20 20:08 jessicaschilling

@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.

lidel avatar Aug 31 '20 20:08 lidel

https://github.com/ipfs-shipyard/ipfs-companion/pull/920 will close this once merged.

jessicaschilling avatar Sep 10 '20 23:09 jessicaschilling