(self, e: Exception, provider_config: _ErrorClassSource)
| 49 | """ |
| 50 | |
| 51 | def _handle_error(self, e: Exception, provider_config: _ErrorClassSource) -> Exception: |
| 52 | if isinstance(e, httpx.HTTPStatusError): |
| 53 | return provider_config.get_error_class( |
| 54 | error_message=e.response.text, |
| 55 | status_code=e.response.status_code, |
| 56 | headers=dict(e.response.headers), |
| 57 | ) |
| 58 | return e |
| 59 | |
| 60 | def _sync_client( |
| 61 | self, |