TRPCError
Hierarchy
- Error.TRPCError
Constructors
constructor()
Signature
ts
ts
Parameters
| Name | Type | 
|---|---|
| opts | object | 
| opts.cause? | unknown | 
| opts.code | "PARSE_ERROR"|"BAD_REQUEST"|"INTERNAL_SERVER_ERROR"|"UNAUTHORIZED"|"FORBIDDEN"|"NOT_FOUND"|"METHOD_NOT_SUPPORTED"|"TIMEOUT"|"CONFLICT"|"PRECONDITION_FAILED"|"PAYLOAD_TOO_LARGE"|"TOO_MANY_REQUESTS"|"CLIENT_CLOSED_REQUEST" | 
| opts.message? | string | 
Returns
Overrides: Error.constructor
Defined in: packages/server/src/error/TRPCError.ts:31
Properties
cause?
Error
Defined in: packages/server/src/error/TRPCError.ts:28
code
Readonly"PARSE_ERROR"|"BAD_REQUEST"|"INTERNAL_SERVER_ERROR"|"UNAUTHORIZED"|"FORBIDDEN"|"NOT_FOUND"|"METHOD_NOT_SUPPORTED"|"TIMEOUT"|"CONFLICT"|"PRECONDITION_FAILED"|"PAYLOAD_TOO_LARGE"|"TOO_MANY_REQUESTS"|"CLIENT_CLOSED_REQUEST"
Defined in: packages/server/src/error/TRPCError.ts:29
message
string
Inherited from: Error.message
Defined in: node_modules/.pnpm/typescript@4.8.3/node_modules/typescript/lib/lib.es5.d.ts:1041
name
string
Inherited from: Error.name
Defined in: node_modules/.pnpm/typescript@4.8.3/node_modules/typescript/lib/lib.es5.d.ts:1040
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
ts
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
Staticnumber
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
ts
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