Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/polkadot/rpc-provider/coder/error.ts>default

Package publishing for deno.land/x/polkadot
Go to Latest
class default
implements RpcErrorInterface<Data>
extends Error
import { default } from "https://deno.land/x/polkadot@0.2.27/rpc-provider/coder/error.ts";

Examples

const { RpcError } from '@polkadot/util');

throw new RpcError('some message', RpcError.CODES.METHOD_NOT_FOUND); // => error.code = -32601

Constructors

new
default(
message?,
code?: number,
data?: Data,
)

Type Parameters

optional
Data = never

Properties

code: number
optional
data: Data
message: string
name: string
stack: string

Static Properties

CODES: { ASSERT; INVALID_JSONRPC; METHOD_NOT_FOUND; UNKNOWN; }