kleros / gtcr

Web client for the kleros generalized token curated list
https://curate.kleros.io
MIT License
17 stars 10 forks source link

Submitting one wrong item should not break the front-end #298

Open marsrobertson opened 1 year ago

marsrobertson commented 1 year ago

At some point I've made a mistake.

Submitted an item in the format:

ipfs/QmUq97VrrNX2MuoWeygCLVDo4bt5TPPg2DyfvS2yyz4xSM/item.json

Rather than:

/ipfs/QmUq97VrrNX2MuoWeygCLVDo4bt5TPPg2DyfvS2yyz4xSM/item.json

(note the / at the beginning)

It causes error in Chrome Dev Tools:

GET https://ipfs.kleros.ioipfs/QmWhSVtvmWdoBPCqsL6SDtPiqvtWVjaqqNAwaZYNQ9BFL6 net::ERR_NAME_NOT_RESOLVED

⛔️ Kleros hosted: https://curate.kleros.io/tcr/5/0x12B024E0F19Fc27CED2e50A888898304863500E0?registered=true

✅ Localhost: http://localhost:3000/tcr/5/0x12B024E0F19Fc27CED2e50A888898304863500E0?registered=true

image

Suprisingly, it works allright on localhost.

Probably, localhost has different settings than production deployment.

Production deployment should have some "graceful degradation" so that one wrong item does not make entire list unusable.