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

# my.onSocketError

> Listen for WebSocket errors.

Register a callback for WebSocket errors.

## Parameters

| Property | Type     | Required | Description        |
| -------- | -------- | -------- | ------------------ |
| callback | Function | Yes      | Handler for errors |

## Code Example

```javascript theme={null}
my.onSocketError((res) => {
  console.error('WebSocket connection failed. Please check!', res);
});
```
