> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: siteRealtime.onError(handler: ErrorHandler) # Method Link: https://dev.wix.com/docs/sdk/frontend-modules/site-realtime/on-error.md # Method Description: Adds an event handler that runs when an error occurs. An error can occur when attempting to resubscribe after a disconnection. Errors that occur during the initial subscription process cause the Promise returned by the [`subscribe()`](#subscribe) function to reject and do not trigger `onError()` event handlers. # Method Permissions: # Method Permissions Scopes IDs: undefined # Method Code Examples: ## Add an error handler ```javascript import { realtime } from '@wix/site-realtime'; // ... realtime.onError( (error) => { let code = error.errorCode; let message = error.message; if(error.channel) { let channelName = error.channel.name; let resourceId = error.channel.resourceId; } } ); ```