QA Fundamentals · Junior · Question 54 of 75
An API returns 500 when you send an empty name. What does that suggest?
- 1The client must always send a name, so a 500 response is correct
- 2The server didn't validate input and crashed instead of a 400
- 3The network dropped the request on the way
Show the answer
Correct answer: The server didn't validate input and crashed instead of a 400
Explanation
Invalid input should get a 4xx response with a clear message. A 500 means an unhandled error on the server: a bug worth reporting.