Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1736,6 +1736,11 @@ definitions:
- 5
- 0
- 10
max_time:
title: Max cumulative retry wait time (seconds)
description: The maximum total time (in seconds) spent waiting between retries, that is the sum of all backoff intervals, before giving up and failing.
type: integer
default: 600
response_filters:
title: Response Filters
description: List of response filters to iterate on when deciding how to handle an error. When using an array of multiple filters, the filters will be applied sequentially and the response will be selected if it matches any of the filter's predicate.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1936,6 +1936,11 @@ class DefaultErrorHandler(BaseModel):
examples=[5, 0, 10],
title="Max Retry Count",
)
max_time: Optional[int] = Field(
600,
description="The maximum total time (in seconds) spent waiting between retries, that is the sum of all backoff intervals, before giving up and failing.",
title="Max cumulative retry wait time (seconds)",
)
response_filters: Optional[List[HttpResponseFilter]] = Field(
None,
description="List of response filters to iterate on when deciding how to handle an error. When using an array of multiple filters, the filters will be applied sequentially and the response will be selected if it matches any of the filter's predicate.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2267,6 +2267,7 @@ def create_default_error_handler(

return DefaultErrorHandler(
backoff_strategies=backoff_strategies,
max_time=model.max_time,
max_retries=model.max_retries,
response_filters=response_filters,
config=config,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class DefaultErrorHandler(ErrorHandler):
Attributes:
response_filters (Optional[List[HttpResponseFilter]]): response filters to iterate on
max_retries (Optional[int]): maximum retry attempts
max_time (int): maximum cumulative wait time across retries, in seconds
backoff_strategies (Optional[List[BackoffStrategy]]): list of backoff strategies to use to determine how long
to wait before retrying
"""
Expand Down
Loading