Merged
Conversation
yaythomas
requested changes
Nov 14, 2025
| | `CallbackError` | No | Returns FAILED status | Callback handling failures | | ||
| | `StepInterruptedError` | Yes (automatic) | Retries on next invocation | Step interrupted before checkpoint | | ||
| | `CheckpointError` | Depends | Retries if 4xx (except invalid token) | Failed to save execution state | | ||
| | `SerDesError` | No | Returns FAILED status | Serialization failures | |
Contributor
There was a problem hiding this comment.
this does retry from inside a step
| initial_delay_seconds=1, | ||
| max_delay_seconds=10, | ||
| backoff_rate=2.0, | ||
| retryable_error_types=[RuntimeError, ConnectionError], |
Contributor
There was a problem hiding this comment.
retryable_errors: list[str | re.Pattern] = field(
default_factory=lambda: [re.compile(r".*")]
)
retryable_error_types: list[type[Exception]] = field(default_factory=list)
we might want to revisit this logic:
# Check if error is retryable based on error message
is_retryable_error_message = any(
pattern.search(str(error))
if isinstance(pattern, re.Pattern)
else pattern in str(error)
for pattern in config.retryable_errors
)
# Check if error is retryable based on error type
is_retryable_error_type = any(
isinstance(error, error_type) for error_type in config.retryable_error_types
)
if not is_retryable_error_message and not is_retryable_error_type:
return RetryDecision.no_retry()
if e.g you only want to retry ErrorX and you set
RetryStrategyConfig(retryable_error_types = [ErrorX])
it will still retry basically ALL errors because retryable_errors defaults to a permissive regex - this looks counterintuitive to me.
@ParidelPooya + @PartiallyUntyped
Contributor
Author
There was a problem hiding this comment.
Hey @yaythomas the PR to fix this is merged. Do you have any additional feedback?
3c309dd to
a03195c
Compare
yaythomas
approved these changes
Dec 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #165
Description of changes:
This PR adds
docs/advanced/error-handling.mddocumentation for error handling in durable functions. The guide explains exception types (DurableExecutionsError, InvocationError, ValidationError), AWS-compliant error response formats, and HTTP status code mappings. It covers retry strategies for transient failures, error propagation through operations, and troubleshooting guidance for common scenarios. The testing section shows how to assert on error conditions with test examples.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.