oasisprotocol / nexus

Official indexer for the Oasis Network.
Apache License 2.0
15 stars 4 forks source link

Cloudflare timeout errors don't return CORS headers #743

Open lukaw3d opened 2 months ago

lukaw3d commented 2 months ago

Related to https://github.com/oasisprotocol/nexus/pull/733

If nexus doesn't respond, then Cloudflare returns a timeout error, and it is missing CORS headers (open https://explorer.dev.oasis.io/mainnet/sapphire/address/0x8Bc2B030b299964eEfb5e1e0b36991352E56D2D3/events#events, wait 100 seconds, https://nexus.oasis.io/v1/sapphire/events?limit=10&offset=0&rel=oasis1qpdgv5nv2dhxp4q897cgag6kgnm9qs0dccwnckuu fails with 524, frontend is not allowed to read the error code)

Low priority: it rarely happens, and frontend now does show an error in these cases https://github.com/oasisprotocol/explorer/pull/1513

lukaw3d commented 6 days ago

@uscinski says an easy solution is to put a smaller timeout on nexus