Every external call needs a timeout, every timeout needs a fallback — resilience patterns for HTTP, databases, and third-party services
88
90%
Does it follow best practices?
Impact
85%
4.72xAverage score across 5 eval scenarios
Passed
No known issues
{
"instruction": "Provide fallback responses when external dependencies fail or time out",
"relevant_when": "Agent writes code that calls external APIs, databases, or third-party services and returns data to users",
"context": "Every timeout needs a fallback. When a dependency fails, the code should return something useful instead of crashing or returning a raw error. Fallback strategies include: serving stale/cached data, returning a safe default value, returning a partial response with available data, or disabling a non-critical feature. The choice depends on the data: slowly-changing data can use a cache, data with sensible defaults should return the default, and aggregation endpoints should return whatever data sources are available.",
"sources": [
{
"type": "file",
"filename": "skills/graceful-degradation/SKILL.md",
"tile": "tessl-labs/graceful-degradation@0.2.0"
}
],
"checklist": [
{
"name": "catch-returns-fallback",
"rule": "When an external call fails, the catch block returns a meaningful fallback value (cached data, default value, null with a flag, or partial response) instead of re-throwing or returning a raw error to the user",
"relevant_when": "Agent writes try/catch blocks around external service calls"
},
{
"name": "failure-logged-with-context",
"rule": "Caught dependency failures are logged with structured context including the dependency name, the error, and what fallback was used",
"relevant_when": "Agent writes error handling for external service calls"
},
{
"name": "stale-data-flagged",
"rule": "When serving cached or stale data as a fallback, the response includes a flag or metadata indicating the data may be out of date (e.g., stale: true, a warning field, or cache age)",
"relevant_when": "Agent implements cache-based fallbacks for external service data"
}
]
}