Errors
Our live API uses an error record (ErrorMsg) to indicate failures to clients. Error records are processed like any other record, and as such will be passed on to any callbacks, streams, and iterators for the Live client.
| Field | Type | Description |
|---|---|---|
err | str | The error message. |
code | int | Describes the type of error message. See table below. |
is_last | bool | True if this is the last in a series of error records. |
Error code variants
Corresponds with the ErrorCode enum.
| Variant | code | Fatal | Description |
|---|---|---|---|
| AUTH_FAILED | 1 | ✓ | The authentication step failed. |
| API_KEY_DEACTIVATED | 2 | ✓ | The user account or API key were deactivated. |
| CONNECTION_LIMIT_EXCEEDED | 3 | ✓ | The user has exceeded their open connection limit. |
| SYMBOL_RESOLUTION_FAILED | 4 | | A symbol in a subscription failed to resolve. Emitted per unresolved symbol. |
| INVALID_SUBSCRIPTION | 5 | ✓ | There was an issue with a subscription request (other than symbol resolution). |
| INTERNAL_ERROR | 6 | ✓ | An error occurred in the gateway. |
| SKIPPED_RECORDS_AFTER_SLOW_READING | 7 | | A slow client was detected and records were skipped by the gateway to allow catching up. |
| REPLAY_DATA_AGED_OUT | 8 | ✓ | Replay data is no longer retained and the subscription's schema is incompatible with skipping records. |
Fatal errors cause the gateway to close the session after sending the error record. Non-fatal errors are informational and the session continues.
Logging
Our Python client library is fully compatible with the built-in logging module.
When using the live client to build an application, it is recommended to enable logging in the databento module. This logging is disabled by default.