prompt

Retry and Resilience Logic

Add retry logic that handles transient failures without making things worse.

Updated June 2026
The prompt
Help me add retry and resilience logic for calls to {{dependency}} that sometimes fail transiently. Recommend which errors are worth retrying versus not (do not retry a 400, do retry a timeout), exponential backoff with jitter, a retry limit, idempotency so retries are safe, a circuit breaker to stop hammering a failing service, timeouts, and a fallback. Provide the approach. Note how naive retries can amplify an outage and cause cascading failures, and how to retry responsibly. Stack: {{stack}}.
Did it work? Rate this prompt

Variables

Dependency
Stack

Details

Author

AI Khazna

License

Security

Type

prompt

Related assets

More curated picks in Development & Code.

Audit before you install

Run any source through our checks - AI visibility, security, performance, and stack detection.

More in Development & Code