Recall & Review
beginner
What is graceful degradation in the context of REST APIs?
Graceful degradation means the API continues to work in a limited way even if some parts fail, so users still get useful responses instead of errors.
Click to reveal answer
beginner
Why is graceful degradation important for REST APIs?
It helps keep the service reliable and user-friendly by providing fallback responses or partial data when some features or services are unavailable.
Click to reveal answer
intermediate
Give an example of graceful degradation in a REST API.
If a user profile API can't fetch the user's recent posts due to a service failure, it still returns the basic profile info instead of a full error.
Click to reveal answer
intermediate
How can you implement graceful degradation in REST APIs?
By using try-catch blocks, fallback data, default values, and meaningful error messages to handle failures without crashing the whole response.
Click to reveal answer
advanced
What is the difference between graceful degradation and fail-fast in REST APIs?
Graceful degradation tries to keep the API working with limited features during failures, while fail-fast stops immediately and returns an error.
Click to reveal answer
What does graceful degradation aim to provide in a REST API?
✗ Incorrect
Graceful degradation means the API still responds with partial or fallback data when some parts fail.
Which technique helps implement graceful degradation?
✗ Incorrect
Try-catch blocks and fallback data allow the API to handle errors and still respond usefully.
If a REST API cannot fetch some data, what should it do for graceful degradation?
✗ Incorrect
Returning partial data with a warning keeps the API useful even if some data is missing.
Graceful degradation improves which aspect of REST APIs?
✗ Incorrect
Graceful degradation helps users get useful responses even when parts of the API fail.
What is NOT a characteristic of graceful degradation?
✗ Incorrect
Graceful degradation avoids complete failure without response by providing fallback or partial data.
Explain in your own words what graceful degradation means for a REST API and why it matters.
Think about how an API can still be helpful even if some parts break.
You got /3 concepts.
Describe a simple example where a REST API uses graceful degradation to handle a service failure.
Imagine a user profile API missing some info but still returning basic details.
You got /3 concepts.