Skip to content

Type Alias: RbacErrorBody ​

ts
type RbacErrorBody = 
  | {
  error: "UNAUTHENTICATED";
  message: string;
}
  | {
  error: "FORBIDDEN";
  message: string;
  reason: RequirementKind;
  required?: string[][];
};

Defined in: packages/trpc/src/errors.ts:12

Why a guard denied a call: the same body the other integrations send with their 401 / 403 responses (error, reason, message, and required only with exposeRequirements: true).

Released under the MIT License. Inspired by spatie/laravel-permission.