Bird
Raised Fist0

Which of the following is a good practice for implementing graceful degradation in REST APIs?

easy🧠 Conceptual Q2 of Q15
Rest API - Rate Limiting and Throttling
Which of the following is a good practice for implementing graceful degradation in REST APIs?
AReturn HTTP 500 error immediately on any failure
BProvide fallback data or partial responses when some services fail
CIgnore errors and return empty responses silently
DAlways retry indefinitely until success
Step-by-Step Solution
Solution:
  1. Step 1: Identify best practice for graceful degradation

    Graceful degradation means handling failures smoothly by providing fallback or partial data.
  2. Step 2: Evaluate options

    Returning fallback data or partial responses keeps the API usable despite failures, which matches graceful degradation.
  3. Final Answer:

    Provide fallback data or partial responses when some services fail -> Option B
  4. Quick Check:

    Fallback or partial data = graceful degradation [OK]
Quick Trick: Fallback data keeps API usable during partial failures [OK]
Common Mistakes:
MISTAKES
  • Returning HTTP 500 immediately stops graceful degradation
  • Ignoring errors hides problems and confuses clients
  • Retrying indefinitely can cause delays or overload

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes