Bird
0
0

Given this REST API error response JSON, what is the error message for the password field?

medium📝 Predict Output Q13 of 15
Rest API - Error Handling

Given this REST API error response JSON, what is the error message for the password field?

{
  "error": {
    "message": "Validation failed",
    "fields": {
      "email": "Invalid format",
      "password": "Too short"
    }
  }
}
AValidation failed
BInvalid format
CToo short
DNo error
Step-by-Step Solution
Solution:
  1. Step 1: Locate the password field in JSON

    The password error is inside error.fields.password.
  2. Step 2: Read the error message for password

    The value is "Too short", indicating the password error.
  3. Final Answer:

    Too short -> Option C
  4. Quick Check:

    password error message = "Too short" [OK]
Quick Trick: Find error under error.fields.password [OK]
Common Mistakes:
  • Choosing top-level message instead of field error
  • Confusing email error with password error
  • Ignoring nested fields object

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes