@enreachde/swyx-web-extension-sdk - v1.0.1 / Exports / GetErrorCode
Function: GetErrorCode
▸ GetErrorCode(error): ConnectionErrorCode | undefined
Extracts the ConnectionErrorCode from an unknown value.
Returns undefined for any value that is not a ConnectionError.
Parameters
| Name | Type | Description |
|---|---|---|
error | unknown | The caught error value. |
Returns
ConnectionErrorCode | undefined
The ConnectionErrorCode if the error is a ConnectionError, otherwise undefined.