mirror of
https://github.com/LukeHagar/plexpy.git
synced 2025-12-06 04:20:52 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.405.4
This commit is contained in:
17
README.md
17
README.md
@@ -325,13 +325,24 @@ if res.object is not None:
|
||||
<!-- Start Error Handling [errors] -->
|
||||
## Error Handling
|
||||
|
||||
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.
|
||||
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
By default, an API error will raise a errors.SDKError exception, which has the following properties:
|
||||
|
||||
| Property | Type | Description |
|
||||
|-----------------|------------------|-----------------------|
|
||||
| `.status_code` | *int* | The HTTP status code |
|
||||
| `.message` | *str* | The error message |
|
||||
| `.raw_response` | *httpx.Response* | The raw HTTP response |
|
||||
| `.body` | *str* | The response content |
|
||||
|
||||
When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `get_server_capabilities_async` method may raise the following exceptions:
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
||||
| errors.GetServerCapabilitiesBadRequest | 400 | application/json |
|
||||
| errors.GetServerCapabilitiesUnauthorized | 401 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
| errors.SDKError | 4XX, 5XX | \*/\* |
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
Reference in New Issue
Block a user