Skip to content

Function: getRbacErrorBody() ​

ts
function getRbacErrorBody(error): RbacErrorBody | null;

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

The RbacErrorBody of an error thrown by a guard (the TRPCError, or its RbacAccessError cause), or null for any other error.

Parameters ​

ParameterType
errorunknown

Returns ​

RbacErrorBody | null

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