Class: TRPCClientError<TRouterOrProcedure>
Extends
Error
Type parameters
Parameter |
---|
TRouterOrProcedure extends ErrorInferrable |
Implements
TRPCClientErrorBase
<inferErrorShape
<TRouterOrProcedure
> >
Constructors
constructor()
new TRPCClientError<
TRouterOrProcedure
>(message
,opts
?):TRPCClientError
<TRouterOrProcedure
>
Type parameters
Parameter |
---|
TRouterOrProcedure extends ErrorInferrable |
Parameters
Parameter | Type |
---|---|
message | string |
opts ? | object |
opts.cause ? | Error |
opts.meta ? | Record < string , unknown > |
opts.result ? | Maybe < inferErrorShape < TRouterOrProcedure > > |
Returns
TRPCClientError
< TRouterOrProcedure
>
Overrides
Error.constructor
Source
packages/client/src/TRPCClientError.ts:62
Properties
cause
readonly
cause:undefined
|Error
Source
packages/client/src/TRPCClientError.ts:52
Overrides
Error.cause
data
readonly
data:Maybe
<inferErrorShape
<TRouterOrProcedure
>["data"
] >
Source
packages/client/src/TRPCClientError.ts:54
Implementation of
message
message:
string
Source
node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es5.d.ts:1068
Implementation of
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/src/TRPCClientError.ts:60
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/src/TRPCClientError.ts:53
Implementation of
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
Parameter | Type |
---|---|
err | Error |
stackTraces | CallSite [] |
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
Parameter | Type |
---|---|
targetObject | object |
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
Parameter | Type |
---|---|
_cause | Error | TRPCErrorResponse < any > |
opts | object |
opts.meta ? | Record < string , unknown > |
Returns
TRPCClientError
< TRouterOrProcedure
>
Source
packages/client/src/TRPCClientError.ts:86
Generated using TypeDoc and typedoc-plugin-markdown