Method
wrap_errors
(request: APIRequest, call_next: CallNext)
Source from the content-addressed store, hash-verified
| 1023 | ) |
| 1024 | |
| 1025 | def wrap_errors(request: APIRequest, call_next: CallNext) -> Any: |
| 1026 | try: |
| 1027 | return call_next(request) |
| 1028 | except APIConnectionError as err: |
| 1029 | # wrapping a retryable failure with `raise ... from` keeps it on the retry path |
| 1030 | raise Boom("wrapped") from err |
| 1031 | |
| 1032 | client = make_sync_client(middleware=[wrap_errors], max_retries=2) |
| 1033 | |
Callers
nothing calls this directly
Tested by
no test coverage detected