API Testing · Junior · Question 36 of 75

What should happen when a required field is missing from a POST body?

Show the answer

Correct answer: A 4xx error that names the missing field

Explanation

Clear validation messages let clients fix the request. Silently saving null leads to broken data later.

Further reading

Problem with a question

API Testing · Junior · question 36

Test yourself

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

Take this quiz