TRPCClientError<TRouterOrProcedure>
Type parameters
TRouterOrProcedure
extendsRouterOrProcedure
Hierarchy
Error
.TRPCClientError
Implements
TRPCClientErrorBase
<inferErrorShape
<TRouterOrProcedure
>>
Constructors
constructor()
Signature
ts
new TRPCClientError<TRouterOrProcedure>(message: string, opts?: object): TRPCClientError<TRouterOrProcedure>;
ts
new TRPCClientError<TRouterOrProcedure>(message: string, opts?: object): TRPCClientError<TRouterOrProcedure>;
Type parameters
TRouterOrProcedure
extendsRouterOrProcedure
Parameters
Name | Type |
---|---|
message | string |
opts? | object |
opts.cause? | Error |
opts.meta? | Record <string , unknown > |
opts.result? | Maybe <inferErrorShape <TRouterOrProcedure >> |
Returns
TRPCClientError
<TRouterOrProcedure
>
Overrides: Error.constructor
Defined in: packages/client/dist/TRPCClientError.d.ts:16
Properties
cause
Readonly
undefined
|Error
Overrides: Error.cause
Defined in: packages/client/dist/TRPCClientError.d.ts:12
data
Readonly
Maybe
<inferErrorShape
<TRouterOrProcedure
>["data"
]>
Implementation of: TRPCClientErrorBase.data
Defined in: packages/client/dist/TRPCClientError.d.ts:14
message
string
Implementation of: TRPCClientErrorBase.message
Inherited from: Error.message
Defined in: node_modules/.pnpm/typescript@4.8.3/node_modules/typescript/lib/lib.es5.d.ts:1041
meta
Readonly
undefined
|Record
<string
,unknown
>
Defined in: packages/client/dist/TRPCClientError.d.ts:15
name
string
Inherited from: Error.name
Defined in: node_modules/.pnpm/typescript@4.8.3/node_modules/typescript/lib/lib.es5.d.ts:1040
shape
Readonly
Maybe
<inferErrorShape
<TRouterOrProcedure
>>
Implementation of: TRPCClientErrorBase.shape
Defined in: packages/client/dist/TRPCClientError.d.ts:13
stack?
string
Inherited from: Error.stack
Defined in: node_modules/.pnpm/typescript@4.8.3/node_modules/typescript/lib/lib.es5.d.ts:1042
prepareStackTrace?
Function
Type declaration
Optional override for formatting stack traces
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Signature
ts
(err: Error, stackTraces: CallSite[]): any;
ts
(err: Error, stackTraces: CallSite[]): any;
Parameters
Name | Type |
---|---|
err | Error |
stackTraces | CallSite [] |
Returns
any
Inherited from: Error.prepareStackTrace
Defined in: node_modules/.pnpm/@types+node@18.7.20/node_modules/@types/node/ts4.8/globals.d.ts:11
stackTraceLimit
Static
number
Inherited from: Error.stackTraceLimit
Defined in: node_modules/.pnpm/@types+node@18.7.20/node_modules/@types/node/ts4.8/globals.d.ts:13
Methods
captureStackTrace()
Create .stack property on a target object
Signature
ts
Static captureStackTrace(targetObject: object, constructorOpt?: Function): void;
ts
Static captureStackTrace(targetObject: object, constructorOpt?: Function): void;
Parameters
Name | Type |
---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from: Error.captureStackTrace
Defined in: node_modules/.pnpm/@types+node@18.7.20/node_modules/@types/node/ts4.8/globals.d.ts:4
from()
Signature
ts
Static from<TRouterOrProcedure>(cause: Error | TRPCErrorResponse<any>, opts?: object): TRPCClientError<TRouterOrProcedure>;
ts
Static from<TRouterOrProcedure>(cause: Error | TRPCErrorResponse<any>, opts?: object): TRPCClientError<TRouterOrProcedure>;
Type parameters
TRouterOrProcedure
extendsRouterOrProcedure
Parameters
Name | Type |
---|---|
cause | Error | TRPCErrorResponse <any > |
opts? | object |
opts.meta? | Record <string , unknown > |
Returns
TRPCClientError
<TRouterOrProcedure
>
Defined in: packages/client/dist/TRPCClientError.d.ts:21