Wrap `fetch` call in `try/catch`
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- api
Research direction
Start in oxide-api/src/http-client.ts at lines 146-160 and inspect how the fetch call currently propagates failures. Review the linked console issue for the expected handling of non-API errors, then verify that network failures from an offline or throttled browser are handled explicitly without changing normal API error behavior.
Written by the indexing model from the issue text.
Description
In relatively rare situations and through no fault of ours (like network issues) the fetch call here can throw an error. (One way to repro: turn throttling to Offline in Firefox and submit a form.)
That means an error of arbitrary shape gets thrown up to the web console, which doesn't know what to do with it, and in fact is not aware that this can happen. In practice, this has been ok because we primarly rely on a message property on our ApiError type which is also present on regular Errors. But it would be nice to be able to explicitly handle non-API errors that occur while making an API call. See https://github.com/oxidecomputer/console/issues/2569.
- Dominant language
- TypeScript
- Stars
- 33
- Forks
- 4
- Avg merge
- 6d 9h
- Merged PRs (30d)
- 4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from oxidecomputer/oxide.ts
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
oxidecomputer/oxide.ts#386 ·
-
oxidecomputer/oxide.ts#372 · 2 comments · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
oxidecomputer/oxide.ts#329 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
oxidecomputer/oxide.ts#250 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
oxidecomputer/oxide.ts#248 ·
All issues in oxidecomputer/oxide.ts
Similar issues
-
comp/dashboard P3 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
NousResearch/hermes-agent#117722 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·