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

# getCodeFromWSError

> Function getCodeFromWSError in the Baileys API.

> **getCodeFromWSError**(`error`): `number`

Defined in: [src/Utils/generics.ts:420](https://github.com/WhiskeySockets/Baileys/blob/master/src/Utils/generics.ts#L420)

## Parameters

### error

`Error`

## Returns

`number`
