Skip to content
Sharp

FastAPI · interview question

A teammate submits shaky api errors code. Which review comment is the strongest?

Multiple choiceHardchapter-13-curatedpremiumfastapiapi-errors
Choose one answer
Answer and explanation

Correct answer

B. Make the rule clearer and easier to explain. Return status codes and messages that are truthful for the caller while preserving deeper detail in logs.

Why

The best review comment anchors the change to readability, correctness, and future maintenance. Dumping raw exceptions at the client boundary makes the API feel accidental and insecure.

Test yourself on FastAPI

A free test with instant, explained results. No account needed.

Start free test
All FastAPI questions →