Question · Vibe coding with Claude Code course · Module 12: Medium clone

A 409 response and only .catch

The server answers the 51st clap with code 409. What will the button version do that rolls the counter back only in fetch(...).catch(...)?

Answer options

  • It will roll the counter back, because .catch catches every HTTP error code
  • It will show a message and roll the counter back only after the page is refreshed
  • It will stop the whole page with an unhandled exception
  • It will not roll the counter back, because fetch rejects the promise only on a network error, and a 409 response arrives like a success

You can check the correct answer by solving this task in the CodeWorlds game.