RpcError
Defined in: client-sdk-js/src/rpc.ts:7
Specialized error for RPC methods.
When thrown in an RPC handler, the message and code are sent back to
the caller. Built-in error codes 1001–1999 are reserved.
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new RpcError( code, message, data?): RpcError;Defined in: client-sdk-js/src/rpc.ts:14
Parameters
Section titled “Parameters”number
message
Section titled “message”string
string
Returns
Section titled “Returns”RpcError
Overrides
Section titled “Overrides”Error.constructor
Properties
Section titled “Properties”code: number;Defined in: client-sdk-js/src/rpc.ts:11
data?: string;Defined in: client-sdk-js/src/rpc.ts:12
message
Section titled “message”message: string;Defined in: website/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075
Inherited from
Section titled “Inherited from”Error.message
name: string;Defined in: website/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1074
Inherited from
Section titled “Inherited from”Error.name
stack?
Section titled “stack?”stack?: string;Defined in: website/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”Error.stack
ErrorCode
Section titled “ErrorCode”static ErrorCode: object;Defined in: client-sdk-js/src/rpc.ts:20
APPLICATION_ERROR
Section titled “APPLICATION_ERROR”readonly APPLICATION_ERROR: 1500 = 1500;CONNECTION_TIMEOUT
Section titled “CONNECTION_TIMEOUT”readonly CONNECTION_TIMEOUT: 1501 = 1501;RECIPIENT_DISCONNECTED
Section titled “RECIPIENT_DISCONNECTED”readonly RECIPIENT_DISCONNECTED: 1503 = 1503;RECIPIENT_NOT_FOUND
Section titled “RECIPIENT_NOT_FOUND”readonly RECIPIENT_NOT_FOUND: 1401 = 1401;REQUEST_PAYLOAD_TOO_LARGE
Section titled “REQUEST_PAYLOAD_TOO_LARGE”readonly REQUEST_PAYLOAD_TOO_LARGE: 1402 = 1402;RESPONSE_PAYLOAD_TOO_LARGE
Section titled “RESPONSE_PAYLOAD_TOO_LARGE”readonly RESPONSE_PAYLOAD_TOO_LARGE: 1504 = 1504;RESPONSE_TIMEOUT
Section titled “RESPONSE_TIMEOUT”readonly RESPONSE_TIMEOUT: 1502 = 1502;SEND_FAILED
Section titled “SEND_FAILED”readonly SEND_FAILED: 1505 = 1505;UNSUPPORTED_METHOD
Section titled “UNSUPPORTED_METHOD”readonly UNSUPPORTED_METHOD: 1400 = 1400;ErrorMessage
Section titled “ErrorMessage”static ErrorMessage: Record<keyof typeof ErrorCode, string>;Defined in: client-sdk-js/src/rpc.ts:32
MAX_DATA_BYTES
Section titled “MAX_DATA_BYTES”static MAX_DATA_BYTES: number = 15360;Defined in: client-sdk-js/src/rpc.ts:9
MAX_MESSAGE_BYTES
Section titled “MAX_MESSAGE_BYTES”static MAX_MESSAGE_BYTES: number = 256;Defined in: client-sdk-js/src/rpc.ts:8
Methods
Section titled “Methods”builtIn()
Section titled “builtIn()”static builtIn(key, data?): RpcError;Defined in: client-sdk-js/src/rpc.ts:45
Create a built-in error by key name.
Parameters
Section titled “Parameters”| "APPLICATION_ERROR"
| "CONNECTION_TIMEOUT"
| "RESPONSE_TIMEOUT"
| "RECIPIENT_DISCONNECTED"
| "RESPONSE_PAYLOAD_TOO_LARGE"
| "SEND_FAILED"
| "UNSUPPORTED_METHOD"
| "RECIPIENT_NOT_FOUND"
| "REQUEST_PAYLOAD_TOO_LARGE"
string
Returns
Section titled “Returns”RpcError