Class: TRPCError
Extends
Error
Constructors
constructor()
new TRPCError(
opts):TRPCError
Parameters
| Parameter | Type |
|---|---|
opts | object |
opts.cause? | unknown |
opts.code | "PARSE_ERROR" | "BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_SUPPORTED" | "TIMEOUT" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNPROCESSABLE_CONTENT" | "TOO_MANY_REQUESTS" | "CLIENT_CLOSED_REQUEST" |
opts.message? | string |
Returns
Overrides
Error.constructor
Source
packages/core/dist/error/TRPCError.d.ts:7
Properties
cause
optionalreadonlycause:Error
Source
packages/core/dist/error/TRPCError.d.ts:5
Overrides
Error.cause
code
readonlycode:"PARSE_ERROR"|"BAD_REQUEST"|"INTERNAL_SERVER_ERROR"|"NOT_IMPLEMENTED"|"UNAUTHORIZED"|"FORBIDDEN"|"NOT_FOUND"|"METHOD_NOT_SUPPORTED"|"TIMEOUT"|"CONFLICT"|"PRECONDITION_FAILED"|"PAYLOAD_TOO_LARGE"|"UNPROCESSABLE_CONTENT"|"TOO_MANY_REQUESTS"|"CLIENT_CLOSED_REQUEST"
Source
packages/core/dist/error/TRPCError.d.ts:6
message
message:
string
Source
node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es5.d.ts:1068
Inherited from
Error.message
name
name:
string
Source
node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es5.d.ts:1067
Inherited from
Error.name
stack
optionalstack:string
Source
node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es5.d.ts:1069
Inherited from
Error.stack
prepareStackTrace
staticoptionalprepareStackTrace: (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@20.10.4/node_modules/@types/node/globals.d.ts:28
Inherited from
Error.prepareStackTrace
stackTraceLimit
staticstackTraceLimit:number
Source
node_modules/.pnpm/@types+node@20.10.4/node_modules/@types/node/globals.d.ts:30
Inherited from
Error.stackTraceLimit
Methods
captureStackTrace()
staticcaptureStackTrace(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@20.10.4/node_modules/@types/node/globals.d.ts:21
Generated using TypeDoc and typedoc-plugin-markdown