Bird
Raised Fist0

A REST API returns full user data normally, but when the address service fails, it returns user data without address and HTTP 200 status. Why is this NOT graceful degradation?

medium📝 Debug Q7 of Q15
Rest API - Rate Limiting and Throttling
A REST API returns full user data normally, but when the address service fails, it returns user data without address and HTTP 200 status. Why is this NOT graceful degradation?
ABecause it should return HTTP 500 on failure
BBecause it returns HTTP 200 status code
CBecause it returns partial data without indicating partial success
DBecause it should return empty data instead
Step-by-Step Solution
Solution:
  1. Step 1: Understand graceful degradation signaling

    Graceful degradation requires indicating partial success, usually via status code or message.
  2. Step 2: Analyze the API behavior

    Returning partial data with HTTP 200 hides the failure, so clients can't detect degraded state.
  3. Final Answer:

    Because it returns partial data without indicating partial success -> Option C
  4. Quick Check:

    Partial data must signal partial success [OK]
Quick Trick: Partial data needs partial success status or message [OK]
Common Mistakes:
MISTAKES
  • Assuming HTTP 200 always means full success
  • Thinking HTTP 500 is required for partial failures
  • Believing empty data is better than partial data

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes