Source: https://databento.com/docs/api-live/basics/errors


### 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](https://databento.com/docs/api-live/client/live.md) 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](https://docs.python.org/3/library/logging.html) 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.
