Method
__init__
(
self, message: str, *, response: httpx.Response, body: object | None
)
Source from the content-addressed store, hash-verified
| 10 | request_id: str | None |
| 11 | |
| 12 | def __init__( |
| 13 | self, message: str, *, response: httpx.Response, body: object | None |
| 14 | ) -> None: |
| 15 | super().__init__(message, response.request, body=body) |
| 16 | self.response = response |
| 17 | self.status_code = response.status_code |
| 18 | self.request_id = response.headers.get("x-request-id") |
| 19 | |
| 20 | |
| 21 | class APIConnectionError(Exception): |
Tested by
no test coverage detected