QA Fundamentals · Middle · Question 39 of 75
What should be checked in an API error response besides the status code?
- 1That the response is always an HTML error page
- 2That the body contains the server's stack trace
- 3A clear, consistent error body without internal details
Show the answer
Correct answer: A clear, consistent error body without internal details
Explanation
Clients need a stable error format (code, message, fields). Stack traces, SQL or file paths leak internals and are a security finding.