src/app/core/permissions/not-permitted.error.ts
The permission rules do not allow the current user what was requested: our
backend answered 403, or 401 "not permitted" (converted by the database layer
and the HTTP interceptor, see backend-response.ts), or any 401 to a session
without login (e.g. a public form, see RemotePouchDatabase).
No results matching.
Properties |
|
constructor(message: string, options?: TypedErrorOptions)
|
|||||||||
|
Parameters :
|
| Readonly classification |
Type : ErrorClassification
|
|
Inherited from
TypedError
|
|
The kind of failure: an own property, so that a copy of the error that lost
its class (as PouchDB's |
| Readonly Optional status |
Type : number
|
|
Inherited from
TypedError
|
|
The HTTP status of the failed request, if any. |
| 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 {
TypedError,
TypedErrorOptions,
} from "#src/app/core/logging/error-classification";
/**
* The permission rules do not allow the current user what was requested: our
* backend answered 403, or 401 "not permitted" (converted by the database layer
* and the HTTP interceptor, see `backend-response.ts`), or any 401 to a session
* without login (e.g. a public form, see `RemotePouchDatabase`).
*/
export class NotPermittedError extends TypedError {
constructor(message: string, options?: TypedErrorOptions) {
super("NotPermittedError", "not-permitted", message, options);
}
}