not-node 5.1.7 → 5.1.8

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": "not-node",
3
- "version": "5.1.7",
3
+ "version": "5.1.8",
4
4
  "description": "node complimentary part for client side notFramework.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -2,7 +2,7 @@ const { notRequestError } = require("not-error");
2
2
 
3
3
  //delete wasnt successful, or error, or count of deleted documents dont match requested
4
4
  class DBExceptionDeleteWasNotSuccessful extends notRequestError {
5
- constructor({ params = {}, cause = null }) {
5
+ constructor({ params = {}, cause = null } = {}) {
6
6
  super("DB Delete Was Not Successful", { code: 505, ...params }, cause);
7
7
  }
8
8
  }
@@ -11,7 +11,7 @@ module.exports.DBExceptionDeleteWasNotSuccessful =
11
11
 
12
12
  //delete wasnt successful, bc document is owned by another user
13
13
  class DBExceptionDocumentIsNotOwnerByActiveUser extends notRequestError {
14
- constructor({ params = {}, cause = null }) {
14
+ constructor({ params = {}, cause = null } = {}) {
15
15
  super(
16
16
  "DB Only Owners Could Delete their documents",
17
17
  { code: 403, ...params },
@@ -4,7 +4,7 @@ const { notRequestError } = require("not-error");
4
4
 
5
5
  //form of request is not valid
6
6
  class HttpExceptionBadRequest extends notRequestError {
7
- constructor({ params = {}, cause = null }) {
7
+ constructor({ params = {}, cause = null } = {}) {
8
8
  super("Bad Request", { code: 400, ...params }, cause);
9
9
  }
10
10
  }
@@ -12,7 +12,7 @@ module.exports.HttpExceptionBadRequest = HttpExceptionBadRequest;
12
12
 
13
13
  //user is not authenticated
14
14
  class HttpExceptionUnauthorized extends notRequestError {
15
- constructor({ params = {}, cause = null }) {
15
+ constructor({ params = {}, cause = null } = {}) {
16
16
  super("Unauthorized", { code: 401, ...params }, cause);
17
17
  }
18
18
  }
@@ -20,7 +20,7 @@ module.exports.HttpExceptionUnauthorized = HttpExceptionUnauthorized;
20
20
 
21
21
  //user is too poor to go there
22
22
  class HttpExceptionPaymentRequired extends notRequestError {
23
- constructor({ params = {}, cause = null }) {
23
+ constructor({ params = {}, cause = null } = {}) {
24
24
  super("Payment Required", { code: 402, ...params }, cause);
25
25
  }
26
26
  }
@@ -28,7 +28,7 @@ module.exports.HttpExceptionPaymentRequired = HttpExceptionPaymentRequired;
28
28
 
29
29
  //user identity is known, but he has no right to go there
30
30
  class HttpExceptionForbidden extends notRequestError {
31
- constructor({ params = {}, cause = null }) {
31
+ constructor({ params = {}, cause = null } = {}) {
32
32
  super("Forbidden", { code: 403, ...params }, cause);
33
33
  }
34
34
  }
@@ -36,7 +36,7 @@ module.exports.HttpExceptionForbidden = HttpExceptionForbidden;
36
36
 
37
37
  //requested address is not exists
38
38
  class HttpExceptionNotFound extends notRequestError {
39
- constructor({ params = {}, cause = null }) {
39
+ constructor({ params = {}, cause = null } = {}) {
40
40
  super("Not Found", { code: 404, ...params }, cause);
41
41
  }
42
42
  }