Something fails inside your handler. What does the client get, what goes in the logs, and how do you decide?

Answer it out loud before you open anything. The value of the flags below is in comparing them to what you actually said.

The situation behind the question

A service where the current error middleware catches everything and returns 500 with the exception message in the body. A pentest flagged that a database error revealed table names.

What it is really testing

Whether the candidate has a taxonomy that maps a cause to a response, and understands that the response and the log are two different audiences with two different needs.

Where the mechanism is taught