Skip to content

Commit f06754c

Browse files
committed
chore: update docstring for clarity
1 parent 7c23eda commit f06754c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

airbyte_cdk/sources/declarative/requesters/error_handlers/composite_error_handler.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,16 @@ def interpret_response(
8383
def backoff_strategies(self) -> Optional[List[BackoffStrategy]]:
8484
"""
8585
Combines backoff strategies from all child error handlers into a single flattened list.
86-
Note: The first non-None strategy in this list becomes the default strategy for ALL retryable errors,
87-
including both user-defined response filters and errors that fall back to DEFAULT_ERROR_MAPPING.
88-
The list structure is currently not used to map different strategies to different error conditions.
8986
90-
Returns None if no handlers have strategies defined, which will result in the default backoff strategy being used.
87+
When used with HttpRequester, note the following behavior:
88+
- In HttpRequester.__post_init__, the entire list of backoff strategies is assigned to the error handler
89+
- However, the error handler's backoff_time() method only ever uses the first non-None strategy in the list
90+
- This means that if any backoff strategies are present, the first non-None strategy becomes the default
91+
- This applies to both user-defined response filters and errors from DEFAULT_ERROR_MAPPING
92+
- The list structure is not used to map different strategies to different error conditions
93+
- Therefore, subsequent strategies in the list will not be used
94+
95+
Returns None if no handlers have strategies defined, which will result in HttpRequester using its default backoff strategy.
9196
"""
9297
all_strategies = []
9398
for handler in self.error_handlers:

0 commit comments

Comments
 (0)