Bird
0
0

Why might a response envelope include both a 'message' and a 'status' field instead of just one?

hard📝 Conceptual Q10 of 15
Rest API - Request and Response Format
Why might a response envelope include both a 'message' and a 'status' field instead of just one?
A'status' is for developers; 'message' is for machines
B'status' indicates success or failure; 'message' provides human-readable details
C'message' replaces 'status' in error cases only
DBoth fields are redundant and should not be used together
Step-by-Step Solution
Solution:
  1. Step 1: Understand roles of status and message

    Status is a simple code like 'success' or 'error'; message explains what happened.
  2. Step 2: Explain why both are useful

    Clients use status to check flow; message helps users or developers understand details.
  3. Final Answer:

    'status' indicates success or failure; 'message' provides human-readable details -> Option B
  4. Quick Check:

    Status = code, message = explanation [OK]
Quick Trick: Status codes flow; messages explain details [OK]
Common Mistakes:
  • Thinking message is for machines
  • Assuming redundancy
  • Using message only for errors

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes