Skip to main content
Version: 11.x

Class: TRPCClientError<TRouterOrProcedure>

Extends

  • Error

Type parameters

Parameter
TRouterOrProcedure extends TRPCInferrable

Implements

Constructors

constructor()

new TRPCClientError<TRouterOrProcedure>(message, opts?): TRPCClientError< TRouterOrProcedure >

Type parameters

Parameter
TRouterOrProcedure extends TRPCInferrable

Parameters

ParameterType
messagestring
opts?object
opts.cause?Error
opts.meta?Record< string, unknown >
opts.result?Maybe< TRPCErrorResponse< inferErrorShape< TRouterOrProcedure > > >

Returns

TRPCClientError< TRouterOrProcedure >

Overrides

Error.constructor

Source

packages/client/dist/TRPCClientError.d.ts:19

Properties

cause

readonly cause: undefined | Error

Source

packages/client/dist/TRPCClientError.d.ts:11

Overrides

Error.cause


data

readonly data: Maybe< inferErrorShape< TRouterOrProcedure >["data"] >

Source

packages/client/dist/TRPCClientError.d.ts:13

Implementation of

TRPCClientErrorBase.data


message

message: string

Source

node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es5.d.ts:1068

Implementation of

TRPCClientErrorBase.message

Inherited from

Error.message


meta

meta: undefined | Record< string, unknown >

Additional meta data about the error In the case of HTTP-errors, we'll have response and potentially responseJSON here

Source

packages/client/dist/TRPCClientError.d.ts:18


name

name: string

Source

node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es5.d.ts:1067

Inherited from

Error.name


shape

readonly shape: Maybe< inferErrorShape< TRouterOrProcedure > >

Source

packages/client/dist/TRPCClientError.d.ts:12

Implementation of

TRPCClientErrorBase.shape


stack

optional stack: string

Source

node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es5.d.ts:1069

Inherited from

Error.stack


prepareStackTrace

static optional prepareStackTrace: (err, stackTraces) => any

Optional override for formatting stack traces

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Parameters

ParameterType
errError
stackTracesCallSite[]

Returns

any

Source

node_modules/.pnpm/@types+node@20.10.4/node_modules/@types/node/globals.d.ts:28

Inherited from

Error.prepareStackTrace


stackTraceLimit

static stackTraceLimit: number

Source

node_modules/.pnpm/@types+node@20.10.4/node_modules/@types/node/globals.d.ts:30

Inherited from

Error.stackTraceLimit

Methods

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters

ParameterType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

Error.captureStackTrace

Source

node_modules/.pnpm/@types+node@20.10.4/node_modules/@types/node/globals.d.ts:21


from()

static from<TRouterOrProcedure>(_cause, opts?): TRPCClientError< TRouterOrProcedure >

Type parameters

Parameter
TRouterOrProcedure extends TRPCInferrable

Parameters

ParameterType
_causeError | TRPCErrorResponse< any >
opts?object
opts.meta?Record< string, unknown >

Returns

TRPCClientError< TRouterOrProcedure >

Source

packages/client/dist/TRPCClientError.d.ts:24


Generated using TypeDoc and typedoc-plugin-markdown