gateway: return user-friendly HTML with HTTP errors #262
Labels
dif/medium
Prior experience is likely helpful
effort/days
Estimated to take multiple days, but less than a week
P1
High: Likely tackled by core team if no one steps up
topic/gateway
Issues related to HTTP Gateway
Currently, we return
text/plain
with context oferr.Error()
of some sort. This if fine forcurl
, but very user hostile in web browser context.Proposed improvement
basic human needs (#298)
/gateway/assets
User-Agent
header starting withMozilla
and returntext/html
responses for errors instead (same message, but presented nicely)nice to have
below could be a follow-up PR. may not be a good idea to hardcode another HTTP endpoint and use of https://pl-diagnose.onrender.com for every gateway deployment, perhaps better to wait for ipfs/in-web-browsers#207 and webtransport transport rollout. or we could use https://pl-diagnose.onrender.com and https://cid.contact/ as default, with config options to change/disable them.
The text was updated successfully, but these errors were encountered: