Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle web3storage API errors #35

Closed
Tracked by #47
bajtos opened this issue Oct 12, 2023 · 2 comments
Closed
Tracked by #47

Handle web3storage API errors #35

bajtos opened this issue Oct 12, 2023 · 2 comments
Labels
bug 🐛 Something isn't working

Comments

@bajtos
Copy link
Member

bajtos commented Oct 12, 2023

Occasionally, we are not able to fetch measurements from web3.storage because of an internal server error:

Error: Response was not ok: 500 Internal Server Error - Check for { "ok": false } on the Response object before calling .files
    at Response.files (file:///app/node_modules/web3.storage/src/lib.js:540:15)
    at fetchMeasurements (file:///app/lib/preprocess.js:56:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async preprocess (file:///app/lib/preprocess.js:14:24)

We should fix our code to check for res.ok.

Even better, we can implement a retry logic to recover from server errors. (Ideally, we should record telemetry about these retries.)

It would be also great to record telemetry about the status codes returned by web3.storage API calls. For example, a recent log was showing 524 Timeout, but many other logs show 500 Internal Server Error.

@bajtos bajtos added the bug 🐛 Something isn't working label Oct 12, 2023
@bajtos bajtos moved this to 🗃 backlog in Space Meridian Oct 12, 2023
@bajtos bajtos moved this from 🗃 backlog to 📥 todo in Space Meridian Oct 16, 2023
@sentry-io
Copy link

sentry-io bot commented Oct 24, 2023

Sentry issue: SPARK-EVALUATE-1BW

@bajtos
Copy link
Member Author

bajtos commented Jan 8, 2024

I believe this is no longer a problem after #70 reworked CID fetching to use a Trustless HTTP Gateway instead of a w3up client SDK.

@bajtos bajtos closed this as completed Jan 8, 2024
@github-project-automation github-project-automation bot moved this from 📥 todo to ✅ done in Space Meridian Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
Status: ✅ done
Development

No branches or pull requests

1 participant