Interview practice question
Returning validation errors
Backend Engineering · API Design · Beginner
A user submits a signup form with an invalid email and a password that is too short. What should your API return?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- 400 or 422 status.
- Error code and message.
- Per-field details.
- All errors at once.
- Consistent format.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.