exceptions
pixel_client.exceptions ¶
PixelBadRequestError ¶
Bases: Exception
Exception raised when a bad request is made to the Pixel API.
Source code in src/pixel_client/exceptions.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
message
instance-attribute
¶
message = f"Bad request {self.status_code} for {self.method} {self.url} (request ID: {request_id})"
__init__ ¶
__init__(
response_json: dict,
status_code: int,
method: str,
url: str,
request_id: str | None = None,
body: str | None = None,
)
Source code in src/pixel_client/exceptions.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
PixelUploadJobError ¶
Bases: Exception
Exception raised when an upload job fails.
Source code in src/pixel_client/exceptions.py
30 31 32 33 34 35 36 37 38 39 40 41 42 | |
__init__ ¶
Source code in src/pixel_client/exceptions.py
35 36 37 38 39 40 41 42 | |
PixelMultipleUploadJobError ¶
Bases: Exception
Exception raised when multiple upload jobs fail.
Source code in src/pixel_client/exceptions.py
45 46 47 48 49 50 51 52 53 54 | |
__init__ ¶
__init__(errors: list[PixelUploadJobError])
Source code in src/pixel_client/exceptions.py
50 51 52 53 54 | |
PixelAccessUpdateError ¶
Bases: Exception
Exception raised when an access change that spans several requests partly fails.
Every independent request is attempted before this is raised, so
succeeded lists the changes that were applied and failed the ones that
were not, each with the error the API returned.
Attributes:
| Name | Type | Description |
|---|---|---|
succeeded |
The changes that were applied. |
|
failed |
The changes that were not applied, paired with their error. |
|
result |
The object created by the call (a user or group), if it got that far. |
Source code in src/pixel_client/exceptions.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |
__init__ ¶
__init__(
succeeded: list[dict],
failed: list[tuple[dict, Exception]],
result: dict | None = None,
)
Source code in src/pixel_client/exceptions.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |