property
WebSocket.onerror
onerror: null | (this: WebSocket, ev: ErrorEvent) => any
Event handler for error event. Fires when the connection fails, followed by a close event with code 1006. ev.message describes the failure. ev.error is an Error that may have a code, such as "ECONNREFUSED", "ENOTFOUND", "SELF_SIGNED_CERT_IN_CHAIN" or "WS_ERR_INVALID_UTF8".