Class: RbacAccessError
Defined in: packages/trpc/src/errors.ts:20
The cause of the TRPCError a guard throws by default. It carries the RbacErrorBody, which rbacErrorFormatter (or getRbacErrorBody()) puts where clients can read it.
Extends
Error
Constructors
Constructor
ts
new RbacAccessError(body): RbacAccessError;Defined in: packages/trpc/src/errors.ts:27
Parameters
| Parameter | Type |
|---|---|
body | RbacErrorBody |
Returns
RbacAccessError
Overrides
Error.constructor
Properties
| Property | Modifier | Type | Default value | Description | Defined in |
|---|---|---|---|---|---|
body | readonly | RbacErrorBody | undefined | The 401 / 403 body of the other integrations. | packages/trpc/src/errors.ts:23 |
code | readonly | "RBAC_ACCESS_DENIED" | 'RBAC_ACCESS_DENIED' | - | packages/trpc/src/errors.ts:21 |
status | readonly | 401 | 403 | undefined | HTTP-style status: 401 (no subject) or 403 (missing role/permission). | packages/trpc/src/errors.ts:25 |
