Question · Vibe coding with Claude Code course · Module 15: Advanced Claude Code

Quiz: A handler without return after the save

A PATCH handler saves the pin in a try block and has a return only in the catch for bad data. What does a client that sends valid data get?

Answer options

  • Code 200, because Next.js adds an empty response itself after a successful save
  • Code 400, because the function ends in the catch block
  • Nothing, because tsc rejects such a handler already at the build
  • Code 500 with the error No response is returned from route handler, although the change is already in the database

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