Bird
0
0

You receive this HTTP response code and body from a batch update API:

medium📝 Debug Q14 of 15
Rest API - Batch and Bulk Operations
You receive this HTTP response code and body from a batch update API:
HTTP/1.1 207 Multi-Status
{
  "results": [
    {"item": "A", "status": "success"},
    {"item": "B", "status": "fail", "error": "Timeout"}
  ]
}
What is the main issue in this response?
AIncorrect HTTP status code for partial success
BJSON format is invalid
CMissing Content-Type header
DThe status value "fail" should be "failure" or "error"
Step-by-Step Solution
Solution:
  1. Step 1: Check HTTP status code usage

    HTTP 207 Multi-Status is correct for partial success.
  2. Step 2: Verify status field values

    Common practice uses "success" and "failure" or "error"; "fail" is inconsistent and may cause confusion.
  3. Final Answer:

    The status value "fail" should be "failure" or "error" -> Option D
  4. Quick Check:

    Status values must be consistent and clear [OK]
Quick Trick: Use standard status words like 'success' and 'failure' [OK]
Common Mistakes:
MISTAKES
  • Thinking 207 is wrong here
  • Ignoring inconsistent status wording
  • Assuming JSON is invalid without checking

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes