2024-02-12 21:09:28 +01:00
|
|
|
# Errors
|
2023-10-11 09:49:06 +01:00
|
|
|
|
2024-02-12 21:09:28 +01:00
|
|
|
## Tabel of contents
|
2024-11-15 21:13:19 +01:00
|
|
|
- [Error](#errors.error)
|
2024-02-12 21:09:28 +01:00
|
|
|
- [is_connection_error](#errors.is_connection_error)
|
2023-10-11 09:49:06 +01:00
|
|
|
|
2024-11-15 21:13:19 +01:00
|
|
|
|
|
|
|
|
<a id="errors.error"></a>
|
2024-02-12 21:09:28 +01:00
|
|
|
## Error
|
2023-10-11 09:49:06 +01:00
|
|
|
```python
|
2024-11-15 21:13:19 +01:00
|
|
|
class Error
|
2023-10-11 09:49:06 +01:00
|
|
|
```
|
2024-11-15 21:13:19 +01:00
|
|
|
Error class for handling errors.
|
|
|
|
|
|
|
|
|
|
#### Attributes:
|
|
|
|
|
| Name | Type | Description |
|
|
|
|
|
|----------------|--------------|----------------------------------------------|
|
|
|
|
|
| `code` | `int` | Error code |
|
|
|
|
|
| `description` | `str` | Error description |
|
|
|
|
|
| `descriptions` | `dict` | A dictionary of error codes and descriptions |
|
|
|
|
|
| `conn_errors` | `tuple[int]` | A tuple of connection errors |
|
2024-02-12 21:09:28 +01:00
|
|
|
|
2023-10-11 09:49:06 +01:00
|
|
|
|
2024-02-12 21:09:28 +01:00
|
|
|
<a id="errors.is_connection_error"></a>
|
|
|
|
|
## is_connection_error
|
|
|
|
|
```python
|
|
|
|
|
def is_connection_error(self) -> bool
|
|
|
|
|
```
|
2024-11-15 21:13:19 +01:00
|
|
|
Check if an error is a connection error.
|
|
|
|
|
|
|
|
|
|
#### Returns:
|
2024-02-12 21:09:28 +01:00
|
|
|
| Type | Description |
|
|
|
|
|
|--------|------------------------------------------------------|
|
2024-11-15 21:13:19 +01:00
|
|
|
| `bool` | True if error is a connection error, False otherwise |
|