> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metar.ws/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> Error frames are informational and never close the connection on their own.

```json theme={null}
{
    "type": "error",
    "code": "permission_denied",
    "message": "your plan does not allow this channel",
    "action": "subscribe",
    "channel": "metar.obs.eglc"
}
```

## Error codes

| Code                | Meaning                                                                      |
| ------------------- | ---------------------------------------------------------------------------- |
| `bad_request`       | Malformed command JSON                                                       |
| `unknown_action`    | The `action` field is not `subscribe` or `unsubscribe`                       |
| `channel_format`    | The channel name doesn't exist in the server's naming scheme                 |
| `permission_denied` | Your plan doesn't cover this channel, for example live data on a Sandbox key |
| `channel_limit`     | Subscribing would exceed your plan's channel cap                             |

<Warning>
  Errors are informational and never close the connection. Fatal events, such as a revoked key, a plan change, or a slow consumer, close the socket with a WebSocket close frame instead. Just reconnect; see [Heartbeats & Reconnection](/protocol/heartbeats-reconnection).
</Warning>

<Card title="Next: Heartbeats & Reconnection" icon="arrows-rotate" href="/protocol/heartbeats-reconnection">
  Learn how to keep a connection alive and recover from disconnects.
</Card>
