Skip to main content
LLM calls are costly, so you want to configure retry behavior to avoid infinite loops and high costs while still recovering from transient failures. Restate distinguishes between two types of errors:
  • Transient errors: Temporary issues like network failures or rate limits. Restate automatically retries these until they succeed or the retry policy is exhausted.
  • Terminal errors: Permanent failures like invalid input or business rule violations. Restate does not retry these. The invocation fails permanently. You can catch these errors and handle them gracefully.

Retrying LLM calls

LLM API calls fail transiently (rate limits, network issues, provider outages). Configure retry limits to handle this automatically and prevent runaway costs.

Tool execution errors

To learn more about error handling with Restate, consult the error handling guide.

Combining with rollback

For multi-step agent workflows where steps have side effects (bookings, payments, emails), combine error handling with compensation/rollback patterns to undo completed work when later steps fail.