jsonrpc_errors.ts

Declarations
#

5 declarations

view source

JSONRPC_ERROR_CODES
#

jsonrpc_errors.ts view source

{ readonly parse_error: -32700; readonly invalid_request: -32600; readonly method_not_found: -32601; readonly invalid_params: -32602; readonly internal_error: -32603; readonly unauthenticated: -32700 | ... 4 more ... | (number & $brand<...>); ... 7 more ...; readonly ai_provider_error: -32700 | ... 4 more ... | (num...

Extended JSON-RPC error codes with application-specific errors.

jsonrpc_error_messages
#

jsonrpc_errors.ts view source

{ readonly parse_error: (data?: unknown) => { [x: string]: unknown; code: -32700 | -32600 | -32601 | -32602 | -32603 | (number & $brand<"JsonrpcServerErrorCode">); message: string; data?: unknown; }; readonly invalid_request: (data?: unknown) => { ...; }; ... 11 more ...; readonly ai_provider_error: (provider?: stri...

jsonrpc_errors
#

jsonrpc_errors.ts view source

{ readonly parse_error: (data?: unknown) => ThrownJsonrpcError; readonly invalid_request: (data?: unknown) => ThrownJsonrpcError; readonly method_not_found: (method?: string | undefined, data?: unknown) => ThrownJsonrpcError; ... 10 more ...; readonly ai_provider_error: (provider?: string | undefined, message?: stri...

JsonrpcErrorName
#

ThrownJsonrpcError
#

jsonrpc_errors.ts view source

Custom error class for JSON-RPC errors.

inheritance

extends:
  • Error

code

type JsonrpcErrorCode

data

type unknown

constructor

type new (code: -32700 | -32600 | -32601 | -32602 | -32603 | (number & $brand<"JsonrpcServerErrorCode">), message: string, data?: unknown, options?: ErrorOptions | undefined): ThrownJsonrpcError

code
type -32700 | -32600 | -32601 | -32602 | -32603 | (number & $brand<"JsonrpcServerErrorCode">)
message
type string
data?
type unknown
optional
options?
type ErrorOptions | undefined
optional

Depends on
#

Imported by
#