@nr1e/commons 0.0.2-alpha.11 → 0.0.2-alpha.13

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.
@@ -2,8 +2,22 @@ import { HttpStatusCode } from '../http';
2
2
  interface IError {
3
3
  stack?: string;
4
4
  name?: string;
5
+ message?: string;
5
6
  statusCode?: HttpStatusCode | number;
6
7
  }
8
+ export interface HttpErrorMessage {
9
+ message: string;
10
+ }
11
+ export interface HttpError extends Error {
12
+ statusCode: HttpStatusCode | number;
13
+ body: HttpErrorMessage;
14
+ }
15
+ /**
16
+ * Checks if the given parameter is an HttpError.
17
+ *
18
+ * @param e the parameter to check
19
+ */
20
+ export declare function isHttpError(e?: IError | null): e is HttpError;
7
21
  /**
8
22
  * Checks if the given parameter is a NotFoundError.
9
23
  *
@@ -13,9 +27,9 @@ export declare function isNotFoundError(e?: IError | null): e is NotFoundError;
13
27
  /**
14
28
  * Thrown when a resource cannot be found.
15
29
  */
16
- export declare class NotFoundError extends Error {
30
+ export declare class NotFoundError extends Error implements HttpError {
17
31
  readonly statusCode = HttpStatusCode.NOT_FOUND;
18
- readonly body: string | undefined;
32
+ readonly body: HttpErrorMessage;
19
33
  constructor(message?: string);
20
34
  }
21
35
  /**
@@ -29,7 +43,7 @@ export declare function isForbiddenError(e?: IError | null): e is ForbiddenError
29
43
  */
30
44
  export declare class ForbiddenError extends Error {
31
45
  readonly statusCode = HttpStatusCode.FORBIDDEN;
32
- readonly body: string | undefined;
46
+ readonly body: HttpErrorMessage | undefined;
33
47
  constructor(message?: string);
34
48
  }
35
49
  /**
@@ -43,7 +57,7 @@ export declare function isValidationError(e?: IError | null): e is ValidationErr
43
57
  */
44
58
  export declare class ValidationError extends Error {
45
59
  readonly statusCode = HttpStatusCode.BAD_REQUEST;
46
- readonly body: string | undefined;
60
+ readonly body: HttpErrorMessage | undefined;
47
61
  constructor(message?: string);
48
62
  }
49
63
  /**
@@ -57,7 +71,7 @@ export declare function isBadRequestError(e?: IError | null): e is BadRequestErr
57
71
  */
58
72
  export declare class BadRequestError extends Error {
59
73
  readonly statusCode = HttpStatusCode.BAD_REQUEST;
60
- readonly body: string | undefined;
74
+ readonly body: HttpErrorMessage | undefined;
61
75
  constructor(message?: string);
62
76
  }
63
77
  /**
@@ -71,7 +85,7 @@ export declare function isInternalServerError(e?: IError | null): e is InternalS
71
85
  */
72
86
  export declare class InternalServerError extends Error {
73
87
  readonly statusCode = HttpStatusCode.INTERNAL_SERVER_ERROR;
74
- readonly body: string | undefined;
88
+ readonly body: HttpErrorMessage | undefined;
75
89
  constructor(message?: string);
76
90
  }
77
91
  /**
@@ -85,7 +99,7 @@ export declare function isConflictError(e?: IError | null): e is ConflictError;
85
99
  */
86
100
  export declare class ConflictError extends Error {
87
101
  readonly statusCode = HttpStatusCode.CONFLICT;
88
- readonly body: string | undefined;
102
+ readonly body: HttpErrorMessage | undefined;
89
103
  constructor(message?: string);
90
104
  }
91
105
  /**
@@ -99,7 +113,7 @@ export declare function isUnsupportedMediaTypeError(e?: IError | null): e is Uns
99
113
  */
100
114
  export declare class UnsupportedMediaTypeError extends Error {
101
115
  readonly statusCode = HttpStatusCode.UNSUPPORTED_MEDIA_TYPE;
102
- readonly body: string | undefined;
116
+ readonly body: HttpErrorMessage | undefined;
103
117
  constructor(message?: string);
104
118
  }
105
119
  /**
@@ -113,7 +127,7 @@ export declare function isNotImplementedError(e?: IError | null): e is NotImplem
113
127
  */
114
128
  export declare class NotImplementedError extends Error {
115
129
  readonly statusCode = HttpStatusCode.NOT_IMPLEMENTED;
116
- readonly body: string | undefined;
130
+ readonly body: HttpErrorMessage | undefined;
117
131
  readonly expose = true;
118
132
  constructor(message?: string);
119
133
  }
package/errors/errors.js CHANGED
@@ -1,10 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotImplementedError = exports.isNotImplementedError = exports.UnsupportedMediaTypeError = exports.isUnsupportedMediaTypeError = exports.ConflictError = exports.isConflictError = exports.InternalServerError = exports.isInternalServerError = exports.BadRequestError = exports.isBadRequestError = exports.ValidationError = exports.isValidationError = exports.ForbiddenError = exports.isForbiddenError = exports.NotFoundError = exports.isNotFoundError = void 0;
3
+ exports.NotImplementedError = exports.isNotImplementedError = exports.UnsupportedMediaTypeError = exports.isUnsupportedMediaTypeError = exports.ConflictError = exports.isConflictError = exports.InternalServerError = exports.isInternalServerError = exports.BadRequestError = exports.isBadRequestError = exports.ValidationError = exports.isValidationError = exports.ForbiddenError = exports.isForbiddenError = exports.NotFoundError = exports.isNotFoundError = exports.isHttpError = void 0;
4
4
  const http_1 = require("../http");
5
- function messageToJson(message) {
6
- return JSON.stringify({ message });
5
+ /**
6
+ * Checks if the given parameter is an HttpError.
7
+ *
8
+ * @param e the parameter to check
9
+ */
10
+ function isHttpError(e) {
11
+ return !!(e &&
12
+ e.stack &&
13
+ e.statusCode &&
14
+ e.message &&
15
+ e.name &&
16
+ e.name === 'HttpError');
7
17
  }
18
+ exports.isHttpError = isHttpError;
8
19
  /**
9
20
  * Checks if the given parameter is a NotFoundError.
10
21
  *
@@ -14,6 +25,7 @@ function isNotFoundError(e) {
14
25
  return !!(e &&
15
26
  e.stack &&
16
27
  e.statusCode &&
28
+ e.message &&
17
29
  e.name &&
18
30
  e.name === 'NotFoundError');
19
31
  }
@@ -26,7 +38,7 @@ class NotFoundError extends Error {
26
38
  message = message !== null && message !== void 0 ? message : 'Not found';
27
39
  super(message);
28
40
  this.statusCode = http_1.HttpStatusCode.NOT_FOUND;
29
- this.body = messageToJson(message);
41
+ this.body = { message };
30
42
  this.name = 'NotFoundError';
31
43
  }
32
44
  }
@@ -40,6 +52,7 @@ function isForbiddenError(e) {
40
52
  return !!(e &&
41
53
  e.stack &&
42
54
  e.statusCode &&
55
+ e.message &&
43
56
  e.name &&
44
57
  e.name === 'ForbiddenError');
45
58
  }
@@ -52,7 +65,7 @@ class ForbiddenError extends Error {
52
65
  message = message !== null && message !== void 0 ? message : 'Forbidden';
53
66
  super(message);
54
67
  this.statusCode = http_1.HttpStatusCode.FORBIDDEN;
55
- this.body = messageToJson(message);
68
+ this.body = { message };
56
69
  this.name = 'ForbiddenError';
57
70
  }
58
71
  }
@@ -63,7 +76,11 @@ exports.ForbiddenError = ForbiddenError;
63
76
  * @param e the variable to check
64
77
  */
65
78
  function isValidationError(e) {
66
- return !!(e && e.stack && e.statusCode && e.name === 'ValidationError');
79
+ return !!(e &&
80
+ e.stack &&
81
+ e.statusCode &&
82
+ e.message &&
83
+ e.name === 'ValidationError');
67
84
  }
68
85
  exports.isValidationError = isValidationError;
69
86
  /**
@@ -74,7 +91,7 @@ class ValidationError extends Error {
74
91
  message = message !== null && message !== void 0 ? message : 'Validation error';
75
92
  super(message);
76
93
  this.statusCode = http_1.HttpStatusCode.BAD_REQUEST;
77
- this.body = messageToJson(message);
94
+ this.body = { message };
78
95
  this.name = 'ValidationError';
79
96
  }
80
97
  }
@@ -85,7 +102,11 @@ exports.ValidationError = ValidationError;
85
102
  * @param e the parameter to check
86
103
  */
87
104
  function isBadRequestError(e) {
88
- return !!(e && e.stack && e.statusCode && e.name === 'BadRequestError');
105
+ return !!(e &&
106
+ e.stack &&
107
+ e.statusCode &&
108
+ e.message &&
109
+ e.name === 'BadRequestError');
89
110
  }
90
111
  exports.isBadRequestError = isBadRequestError;
91
112
  /**
@@ -96,7 +117,7 @@ class BadRequestError extends Error {
96
117
  message = message !== null && message !== void 0 ? message : 'Bad request';
97
118
  super(message !== null && message !== void 0 ? message : 'Bad request');
98
119
  this.statusCode = http_1.HttpStatusCode.BAD_REQUEST;
99
- this.body = messageToJson(message);
120
+ this.body = { message };
100
121
  this.name = 'BadRequestError';
101
122
  }
102
123
  }
@@ -107,7 +128,11 @@ exports.BadRequestError = BadRequestError;
107
128
  * @param e the parameter to check
108
129
  */
109
130
  function isInternalServerError(e) {
110
- return !!(e && e.stack && e.statusCode && e.name === 'InternalServerError');
131
+ return !!(e &&
132
+ e.stack &&
133
+ e.statusCode &&
134
+ e.message &&
135
+ e.name === 'InternalServerError');
111
136
  }
112
137
  exports.isInternalServerError = isInternalServerError;
113
138
  /**
@@ -118,7 +143,7 @@ class InternalServerError extends Error {
118
143
  message = message !== null && message !== void 0 ? message : 'Internal server error';
119
144
  super(message);
120
145
  this.statusCode = http_1.HttpStatusCode.INTERNAL_SERVER_ERROR;
121
- this.body = messageToJson(message);
146
+ this.body = { message };
122
147
  this.name = 'InternalServerError';
123
148
  }
124
149
  }
@@ -129,7 +154,11 @@ exports.InternalServerError = InternalServerError;
129
154
  * @param e the parameter to check
130
155
  */
131
156
  function isConflictError(e) {
132
- return !!(e && e.stack && e.statusCode && e.name === 'ConflictError');
157
+ return !!(e &&
158
+ e.stack &&
159
+ e.statusCode &&
160
+ e.message &&
161
+ e.name === 'ConflictError');
133
162
  }
134
163
  exports.isConflictError = isConflictError;
135
164
  /**
@@ -140,7 +169,7 @@ class ConflictError extends Error {
140
169
  message = message !== null && message !== void 0 ? message : 'Conflict';
141
170
  super(message);
142
171
  this.statusCode = http_1.HttpStatusCode.CONFLICT;
143
- this.body = messageToJson(message);
172
+ this.body = { message };
144
173
  this.name = 'ConflictError';
145
174
  }
146
175
  }
@@ -154,6 +183,7 @@ function isUnsupportedMediaTypeError(e) {
154
183
  return !!(e &&
155
184
  e.stack &&
156
185
  e.statusCode &&
186
+ e.message &&
157
187
  e.name === 'UnsupportedMediaTypeError');
158
188
  }
159
189
  exports.isUnsupportedMediaTypeError = isUnsupportedMediaTypeError;
@@ -165,7 +195,7 @@ class UnsupportedMediaTypeError extends Error {
165
195
  message = message !== null && message !== void 0 ? message : 'Unsupported media type';
166
196
  super(message);
167
197
  this.statusCode = http_1.HttpStatusCode.UNSUPPORTED_MEDIA_TYPE;
168
- this.body = messageToJson(message);
198
+ this.body = { message };
169
199
  this.name = 'UnsupportedMediaTypeError';
170
200
  }
171
201
  }
@@ -176,7 +206,11 @@ exports.UnsupportedMediaTypeError = UnsupportedMediaTypeError;
176
206
  * @param e the parameter to check
177
207
  */
178
208
  function isNotImplementedError(e) {
179
- return !!(e && e.stack && e.statusCode && e.name === 'NotImplementedError');
209
+ return !!(e &&
210
+ e.stack &&
211
+ e.statusCode &&
212
+ e.message &&
213
+ e.name === 'NotImplementedError');
180
214
  }
181
215
  exports.isNotImplementedError = isNotImplementedError;
182
216
  /**
@@ -188,7 +222,7 @@ class NotImplementedError extends Error {
188
222
  super(message);
189
223
  this.statusCode = http_1.HttpStatusCode.NOT_IMPLEMENTED;
190
224
  this.expose = true;
191
- this.body = messageToJson(message);
225
+ this.body = { message };
192
226
  this.name = 'NotImplementedError';
193
227
  }
194
228
  }
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["errors.ts"],"names":[],"mappings":";;;AAAA,kCAAuC;AAQvC,SAAS,aAAa,CAAC,OAAe;IACpC,OAAO,IAAI,CAAC,SAAS,CAAC,EAAC,OAAO,EAAC,CAAC,CAAC;AACnC,CAAC;AAED;;;;GAIG;AACH,SAAgB,eAAe,CAAC,CAAiB;IAC/C,OAAO,CAAC,CAAC,CACP,CAAC;QACD,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,IAAI,KAAK,eAAe,CAC3B,CAAC;AACJ,CAAC;AARD,0CAQC;AAED;;GAEG;AACH,MAAa,aAAc,SAAQ,KAAK;IAGtC,YAAY,OAAgB;QAC1B,OAAO,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,WAAW,CAAC;QACjC,KAAK,CAAC,OAAO,CAAC,CAAC;QAJR,eAAU,GAAG,qBAAc,CAAC,SAAS,CAAC;QAK7C,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;QACnC,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AATD,sCASC;AAED;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,CAAiB;IAChD,OAAO,C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,OAAO,GAAI,iBAAiB,CAAC;QACvC,KAAK,CAAC,OAAO,CAAC,CAAC;QALR,eAAU,GAAG,qBAAc,CAAC,eAAe,CAAC;QAE5C,WAAM,GAAG,IAAI,CAAC;QAIrB,IAAI,CAAC,IAAI,GAAG,EAAC,OAAO,EAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AAVD,kDAUC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nr1e/commons",
3
3
  "description": "Provides common patterns for validation",
4
- "version": "0.0.2-alpha.11",
4
+ "version": "0.0.2-alpha.13",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
7
7
  "author": "NR1E, Inc.",