API Testing · Middle · Question 25 of 75

What should an error response for invalid input look like?

Show the answer

Correct answer: A consistent format with a code, message and the problem fields

Explanation

Formats like RFC 9457 problem details make errors predictable for clients and easy to assert in tests.

Further reading

Problem with a question

API Testing · Middle · question 25

Test yourself

Take the API Testing · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz