src/app/core/entity/entity-mapper/entity-permission-error.ts
The current user's permission rules do not allow the action on the entity, checked in the app before the request: as the UI disables actions the user may not do, this usually points to a bug, unlike a NotPermittedError of the server.
action, entityId and entityType are kept out of the message (they would
split the issue in remote monitoring) and reported as extra data instead.
No results matching.
Properties |
|
constructor(action: string, entityId: string, entityType: string)
|
| Public Readonly action |
Type : string
|
| Public Readonly entityId |
Type : string
|
| Public Readonly entityType |
Type : string
|
| Readonly Optional details |
Type : Record<string, unknown>
|
|
Inherited from
NamedError
|
|
Context for the report, kept out of the message so that it does not split the issue. |
import { NamedError } from "#src/app/core/logging/reported-errors";
/**
* The current user's permission rules do not allow the action on the entity,
* checked in the app before the request: as the UI disables actions the user may
* not do, this usually points to a bug, unlike a {@link NotPermittedError} of the server.
*
* `action`, `entityId` and `entityType` are kept out of the message (they would
* split the issue in remote monitoring) and reported as extra data instead.
*/
export class EntityPermissionError extends NamedError {
constructor(
public readonly action: string,
public readonly entityId: string,
public readonly entityType: string,
) {
super("EntityPermissionError", "Current user is not permitted this action");
}
}