Method
wrap_errors
(request: APIRequest, call_next: CallNext)
Source from the content-addressed store, hash-verified
| 824 | ) |
| 825 | |
| 826 | def wrap_errors(request: APIRequest, call_next: CallNext) -> Any: |
| 827 | try: |
| 828 | return call_next(request) |
| 829 | except APIConnectionError as err: |
| 830 | # wrapping a retryable failure with `raise ... from` keeps it on the retry path |
| 831 | raise Boom("wrapped") from err |
| 832 | |
| 833 | client = make_sync_client(middleware=[wrap_errors], max_retries=2) |
| 834 | |
Callers
nothing calls this directly
Tested by
no test coverage detected