Bird
0
0

What will be the output message from this REST API error response?

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

What will be the output message from this REST API error response?

{"status": 404, "error": "Resource not found", "details": "User ID 123 does not exist"}
AUser ID 123 does not exist
B404 Error
CResource not found
DResource not found: User ID 123 does not exist
Step-by-Step Solution
Solution:
  1. Step 1: Read the error fields in the JSON

    The error message is "Resource not found" and details add "User ID 123 does not exist".
  2. Step 2: Combine error and details for full message

    Concatenate error and details for a clear human-readable message.
  3. Final Answer:

    Resource not found: User ID 123 does not exist -> Option D
  4. Quick Check:

    Error + details = Full message [OK]
Quick Trick: Combine error and details for clarity [OK]
Common Mistakes:
  • Ignoring details field
  • Using only status code as message
  • Confusing error and details order

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes