Исключения¶
cdekx.exceptions.CdekxError
¶
Bases: Exception
Base exception of the library.
cdekx.exceptions.ApiError
¶
Bases: CdekxError
The CDEK API returned an error (HTTP 4xx/5xx).
Attributes:
| Name | Type | Description |
|---|---|---|
status_code |
HTTP status of the response. |
|
errors |
tuple[ApiErrorDetail, ...]
|
parsed entries of the |
body |
the response body as-is (a |
|
request_id |
|
cdekx.exceptions.AuthError
¶
cdekx.exceptions.ValidationError
¶
cdekx.exceptions.TransportError
¶
cdekx.exceptions.TimeoutExceeded
¶
cdekx.exceptions.ConfigError
¶
Bases: CdekxError, ValueError
Invalid client configuration (missing credentials, bad URL, and so on).
cdekx.endpoints.base.ResponseParseError
¶
Bases: CdekxError, ValueError
The API response does not match the expected schema.
Raised when CDEK has changed the contract. The exception keeps the raw data
(raw) so the problem can be diagnosed and reported.