Practice · 1 of 3
Abort Classifier
CHALLENGE
Difficulty: intermediate+25 XP
Write classifyError(err) that RETURNS "aborted" when err is an object with err.name === "AbortError", "network" when err.message contains "fetch" or "network" (case-insensitive), and "other" for everything else (including non-Error values).
Press Submit to check your solution.
Back to lesson: Practice: Cancellation — Practice