Fetch Error Handling Quiz
Multiple Choice Medium
Question
Does fetch() reject the promise on a 404 response?
Hint
fetch treats 404 as a successful HTTP response.
Explanation
fetch() only rejects the promise on network failures (e.g., DNS resolution failure, connection refused). A 404 response is a valid HTTP response, so the promise resolves — you must check response.ok or response.status manually to handle HTTP errors.
Related Resources
Related Lessons
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.