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/server/src/error/TRPCError.ts:32
Properties
cause
optional
readonly
cause:Error
Source
packages/server/src/error/TRPCError.ts:29
Overrides
Error.cause
code
readonly
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"
Source
packages/server/src/error/TRPCError.ts:30
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
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@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
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