@enreachde/swyx-web-extension-sdk - v1.0.1 / Exports / GetConnectionError
Function: GetConnectionError
▸ GetConnectionError(error): ConnectionError
Converts an unknown thrown value into a ConnectionError. If the value is already a ConnectionError it is returned as-is; otherwise a new error with code ConnectionErrorCode.ConnectFailed is created.
Parameters
| Name | Type | Description |
|---|---|---|
error | unknown | The caught error value. |
Returns
A ConnectionError that represents the failure.