Return status codes and messages that are truthful for the caller while preserving deeper detail in logs. Good interview answers distinguish caller-facing errors from operator-facing diagnostics.
The strongest answers connect the feature to reasoning and tradeoffs instead of reciting syntax.
Additional Notes
How should you explain api errors in an interview?