Catch an API that does not exist
Easy25 minFree, no account
The failure that costs the most time in practice, because the code reads perfectly.
The question
You asked a model to add request cancellation and a retry budget to a fetch wrapper. It produced the code below, confidently.
Decide what you believe, what you would check, and in what order.
const res = await fetch(url, {
signal: AbortSignal.timeout(5000),
retry: { attempts: 3, backoff: "exponential" }, // ?
priority: "high",
});
if (res.timedOut) { // ?
return fallback;
}
const data = await res.json({ reviver }); // ?25:00Commit to an answer before you open the solution. Reading it first teaches you to recognise good answers, which is not the skill being tested.
Stuck?
0 of 3 hints takenThe worked solution
written by a person · not a gradeScore yourself
0 of 5 marked- Identified the invented APIs correctly30
- Explained why silent ignoring is the hazard25
- Checked primary sources rather than re-prompting20
- Proposed an assertion that proves the behaviour exists15
- Suggested a typed surface to remove the class10
We run no AI here and nothing on this page grades you. The score is yours, and the useful number is the one you get on the same problem a month from now, cold.
kept in this browser only