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:61
Properties
cause
optionalreadonlycause:Error
Source
packages/server/src/error/TRPCError.ts:58
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/server/src/error/TRPCError.ts:59
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@18.16.16/node_modules/@types/node/globals.d.ts:11
Inherited from
Error.prepareStackTrace
stackTraceLimit
staticstackTraceLimit:number
Source
node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/globals.d.ts:13
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@18.16.16/node_modules/@types/node/globals.d.ts:4
Generated using TypeDoc and typedoc-plugin-markdown