Check the Fetch Response

Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.

The problem

  • medium
  • Pro

An app calls fetch to load a profile. When the server returns a four hundred and four or a five hundred page, the app doesn't show an error: instead it crashes later trying to read the JSON. Explain how fetch reports errors, and how you'd write a safe wrapper.

Talk this problem through with an AI coach

This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.

Start free →