@platecms/delta-errors 1.13.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platecms/delta-errors",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "Error classes and their data for the Delta platform.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"publishConfig": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"src/**/*"
|
|
18
18
|
],
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@platecms/delta-types": "1.
|
|
20
|
+
"@platecms/delta-types": "1.15.0",
|
|
21
21
|
"tslib": "2.8.1",
|
|
22
22
|
"class-transformer": "0.5.1",
|
|
23
23
|
"reflect-metadata": "0.2.2",
|
|
@@ -9,9 +9,9 @@ import { ResourceAccessErrorContext } from "../types/resource-access-error-conte
|
|
|
9
9
|
export class ForbiddenError extends PlateError<ResourceAccessErrorContext> {
|
|
10
10
|
public override readonly code = ErrorCode.FORBIDDEN;
|
|
11
11
|
|
|
12
|
-
public constructor(context: ResourceAccessErrorContext) {
|
|
12
|
+
public constructor(context: ResourceAccessErrorContext, message?: string) {
|
|
13
13
|
super(
|
|
14
|
-
`The client does not have the permission to perform '${context.action}' on '${context.resourceType}'.`,
|
|
14
|
+
message ?? `The client does not have the permission to perform '${context.action}' on '${context.resourceType}'.`,
|
|
15
15
|
context,
|
|
16
16
|
);
|
|
17
17
|
}
|