Skip to main content
Version: 10.x

Class: TRPCClientError<TRouterOrProcedure>

Extends

  • Error

Type parameters

Parameter
TRouterOrProcedure extends ErrorInferrable

Implements

Constructors

constructor()

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

Type parameters

Parameter
TRouterOrProcedure extends ErrorInferrable

Parameters

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

Returns

TRPCClientError< TRouterOrProcedure >

Overrides

Error.constructor

Source

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

Properties

cause

readonly cause: undefined | Error

Source

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

Overrides

Error.cause


data

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

Source

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

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:19


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:13

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@18.16.16/node_modules/@types/node/globals.d.ts:11

Inherited from

Error.prepareStackTrace


stackTraceLimit

static stackTraceLimit: number

Source

node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/globals.d.ts:13

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@18.16.16/node_modules/@types/node/globals.d.ts:4


from()

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

Type parameters

Parameter
TRouterOrProcedure extends ErrorInferrable

Parameters

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

Returns

TRPCClientError< TRouterOrProcedure >

Source

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


Generated using TypeDoc and typedoc-plugin-markdown