Provider.parseError
Parses an error object into an error instance.
Imports
Named
import { Provider } from 'ox'
Examples
import { Provider } from 'ox'
const error = Provider.parseErrorObject({ code: 4200, message: 'foo' })
const error: Provider.UnsupportedMethodErrorerror
Definition
function parseError<errorObject>(
errorObject: errorObject | RpcResponse.ErrorObject,
): parseError.ReturnType<errorObject>
Source: src/core/Provider.ts
Parameters
errorObject
- Type:
errorObject | RpcResponse.ErrorObject
The error object to parse.
Return Type
An error instance.
parseError.ReturnType<errorObject>