Bird
Raised Fist0

What will be the output error message for the address.zipcode field in this JSON?

medium📝 Predict Output Q5 of Q15
Rest API - Error Handling

What will be the output error message for the address.zipcode field in this JSON?

{
  "errors": {
    "address": {
      "street": "Required",
      "zipcode": "Invalid format"
    }
  }
}

A"address error"
B"Required"
C"No error"
D"Invalid format"
Step-by-Step Solution
Solution:
  1. Step 1: Find the zipcode error in the nested address object

    The zipcode field inside address has the message "Invalid format".
  2. Step 2: Confirm the exact message for zipcode

    It is exactly "Invalid format", not any other message.
  3. Final Answer:

    "Invalid format" -> Option D
  4. Quick Check:

    Nested field zipcode error = "Invalid format" [OK]
Quick Trick: Nested fields hold their own error messages [OK]
Common Mistakes:
MISTAKES
  • Choosing sibling field's error message
  • Assuming generic error message
  • Ignoring nested structure

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes