@rexezuge/errors 0.0.0-stage → 1.0.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/LICENSE +21 -0
- package/dist/BadGatewayError.d.ts +10 -0
- package/dist/BadGatewayError.d.ts.map +1 -0
- package/dist/BadGatewayError.js +12 -0
- package/dist/BadGatewayError.js.map +1 -0
- package/dist/BadRequestError.d.ts +9 -0
- package/dist/BadRequestError.d.ts.map +1 -0
- package/dist/BadRequestError.js +11 -0
- package/dist/BadRequestError.js.map +1 -0
- package/dist/CATALOG.d.ts +108 -0
- package/dist/CATALOG.d.ts.map +1 -0
- package/dist/CATALOG.js +92 -0
- package/dist/CATALOG.js.map +1 -0
- package/dist/ConflictError.d.ts +10 -0
- package/dist/ConflictError.d.ts.map +1 -0
- package/dist/ConflictError.js +12 -0
- package/dist/ConflictError.js.map +1 -0
- package/dist/DatabaseError.d.ts +16 -0
- package/dist/DatabaseError.d.ts.map +1 -0
- package/dist/DatabaseError.js +18 -0
- package/dist/DatabaseError.js.map +1 -0
- package/dist/ErrorResponse.d.ts +16 -0
- package/dist/ErrorResponse.d.ts.map +1 -0
- package/dist/ErrorResponse.js +2 -0
- package/dist/ErrorResponse.js.map +1 -0
- package/dist/ForbiddenError.d.ts +9 -0
- package/dist/ForbiddenError.d.ts.map +1 -0
- package/dist/ForbiddenError.js +11 -0
- package/dist/ForbiddenError.js.map +1 -0
- package/dist/HttpServiceError.d.ts +14 -0
- package/dist/HttpServiceError.d.ts.map +1 -0
- package/dist/HttpServiceError.js +16 -0
- package/dist/HttpServiceError.js.map +1 -0
- package/dist/InternalServerError.d.ts +16 -0
- package/dist/InternalServerError.d.ts.map +1 -0
- package/dist/InternalServerError.js +16 -0
- package/dist/InternalServerError.js.map +1 -0
- package/dist/MethodNotAllowedError.d.ts +9 -0
- package/dist/MethodNotAllowedError.d.ts.map +1 -0
- package/dist/MethodNotAllowedError.js +11 -0
- package/dist/MethodNotAllowedError.js.map +1 -0
- package/dist/NotFoundError.d.ts +9 -0
- package/dist/NotFoundError.d.ts.map +1 -0
- package/dist/NotFoundError.js +11 -0
- package/dist/NotFoundError.js.map +1 -0
- package/dist/NotImplementedError.d.ts +9 -0
- package/dist/NotImplementedError.d.ts.map +1 -0
- package/dist/NotImplementedError.js +11 -0
- package/dist/NotImplementedError.js.map +1 -0
- package/dist/OutcomeError.d.ts +41 -0
- package/dist/OutcomeError.d.ts.map +1 -0
- package/dist/OutcomeError.js +50 -0
- package/dist/OutcomeError.js.map +1 -0
- package/dist/PayloadTooLargeError.d.ts +9 -0
- package/dist/PayloadTooLargeError.d.ts.map +1 -0
- package/dist/PayloadTooLargeError.js +11 -0
- package/dist/PayloadTooLargeError.js.map +1 -0
- package/dist/PreconditionFailedError.d.ts +10 -0
- package/dist/PreconditionFailedError.d.ts.map +1 -0
- package/dist/PreconditionFailedError.js +12 -0
- package/dist/PreconditionFailedError.js.map +1 -0
- package/dist/RateLimitedError.d.ts +10 -0
- package/dist/RateLimitedError.d.ts.map +1 -0
- package/dist/RateLimitedError.js +12 -0
- package/dist/RateLimitedError.js.map +1 -0
- package/dist/ServiceError.d.ts +63 -0
- package/dist/ServiceError.d.ts.map +1 -0
- package/dist/ServiceError.js +84 -0
- package/dist/ServiceError.js.map +1 -0
- package/dist/ServiceUnavailableError.d.ts +10 -0
- package/dist/ServiceUnavailableError.d.ts.map +1 -0
- package/dist/ServiceUnavailableError.js +12 -0
- package/dist/ServiceUnavailableError.js.map +1 -0
- package/dist/UnauthorizedError.d.ts +10 -0
- package/dist/UnauthorizedError.d.ts.map +1 -0
- package/dist/UnauthorizedError.js +12 -0
- package/dist/UnauthorizedError.js.map +1 -0
- package/dist/UnsupportedMediaTypeError.d.ts +9 -0
- package/dist/UnsupportedMediaTypeError.d.ts.map +1 -0
- package/dist/UnsupportedMediaTypeError.js +11 -0
- package/dist/UnsupportedMediaTypeError.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/package.json +34 -3
- package/README.md +0 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rexezuge
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HttpServiceError } from './HttpServiceError';
|
|
2
|
+
/**
|
|
3
|
+
* 502 — an upstream dependency answered invalidly. Pair with `retryable: true`
|
|
4
|
+
* when the upstream is known to recover on its own.
|
|
5
|
+
*/
|
|
6
|
+
declare class BadGatewayError extends HttpServiceError<'badGateway'> {
|
|
7
|
+
constructor(message?: string);
|
|
8
|
+
}
|
|
9
|
+
export { BadGatewayError };
|
|
10
|
+
//# sourceMappingURL=BadGatewayError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BadGatewayError.d.ts","sourceRoot":"","sources":["../src/BadGatewayError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;GAGG;AACH,cAAM,eAAgB,SAAQ,gBAAgB,CAAC,YAAY,CAAC;gBAC9C,OAAO,CAAC,EAAE,MAAM;CAG7B;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HttpServiceError } from './HttpServiceError';
|
|
2
|
+
/**
|
|
3
|
+
* 502 — an upstream dependency answered invalidly. Pair with `retryable: true`
|
|
4
|
+
* when the upstream is known to recover on its own.
|
|
5
|
+
*/
|
|
6
|
+
class BadGatewayError extends HttpServiceError {
|
|
7
|
+
constructor(message) {
|
|
8
|
+
super('badGateway', message);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export { BadGatewayError };
|
|
12
|
+
//# sourceMappingURL=BadGatewayError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BadGatewayError.js","sourceRoot":"","sources":["../src/BadGatewayError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;GAGG;AACH,MAAM,eAAgB,SAAQ,gBAA8B;IAC1D,YAAY,OAAgB;QAC1B,KAAK,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;CACF;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HttpServiceError } from './HttpServiceError';
|
|
2
|
+
/**
|
|
3
|
+
* 400 — malformed or missing input. Retrying without a change always fails.
|
|
4
|
+
*/
|
|
5
|
+
declare class BadRequestError extends HttpServiceError<'badRequest'> {
|
|
6
|
+
constructor(message?: string);
|
|
7
|
+
}
|
|
8
|
+
export { BadRequestError };
|
|
9
|
+
//# sourceMappingURL=BadRequestError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BadRequestError.d.ts","sourceRoot":"","sources":["../src/BadRequestError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,cAAM,eAAgB,SAAQ,gBAAgB,CAAC,YAAY,CAAC;gBAC9C,OAAO,CAAC,EAAE,MAAM;CAG7B;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpServiceError } from './HttpServiceError';
|
|
2
|
+
/**
|
|
3
|
+
* 400 — malformed or missing input. Retrying without a change always fails.
|
|
4
|
+
*/
|
|
5
|
+
class BadRequestError extends HttpServiceError {
|
|
6
|
+
constructor(message) {
|
|
7
|
+
super('badRequest', message);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export { BadRequestError };
|
|
11
|
+
//# sourceMappingURL=BadRequestError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BadRequestError.js","sourceRoot":"","sources":["../src/BadRequestError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,MAAM,eAAgB,SAAQ,gBAA8B;IAC1D,YAAY,OAAgB;QAC1B,KAAK,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;CACF;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The single source of truth for HTTP-semantic errors.
|
|
3
|
+
*
|
|
4
|
+
* Eight repos carried this table as fourteen copy-pasted classes; the status,
|
|
5
|
+
* machine code, and default message could drift per file. The catalog keeps all
|
|
6
|
+
* three fields adjacent, so adding a status is one row, and a status can never
|
|
7
|
+
* disagree with its code.
|
|
8
|
+
*
|
|
9
|
+
* `expose` marks whether the raw message may reach a client. Every 4xx is
|
|
10
|
+
* trusted; every 5xx is not — a 5xx message is for operators, and
|
|
11
|
+
* `toErrorResponse()` substitutes a generic one.
|
|
12
|
+
*/
|
|
13
|
+
interface HttpErrorDefinition {
|
|
14
|
+
status: number;
|
|
15
|
+
code: string;
|
|
16
|
+
defaultMessage: string;
|
|
17
|
+
expose: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const CATALOG: {
|
|
20
|
+
readonly badRequest: {
|
|
21
|
+
readonly status: 400;
|
|
22
|
+
readonly code: "BAD_REQUEST";
|
|
23
|
+
readonly defaultMessage: "The request could not be understood or was missing required parameters.";
|
|
24
|
+
readonly expose: true;
|
|
25
|
+
};
|
|
26
|
+
readonly unauthorized: {
|
|
27
|
+
readonly status: 401;
|
|
28
|
+
readonly code: "UNAUTHORIZED";
|
|
29
|
+
readonly defaultMessage: "Authentication is required and has failed or has not yet been provided.";
|
|
30
|
+
readonly expose: true;
|
|
31
|
+
};
|
|
32
|
+
readonly forbidden: {
|
|
33
|
+
readonly status: 403;
|
|
34
|
+
readonly code: "FORBIDDEN";
|
|
35
|
+
readonly defaultMessage: "You do not have permission to perform this action.";
|
|
36
|
+
readonly expose: true;
|
|
37
|
+
};
|
|
38
|
+
readonly notFound: {
|
|
39
|
+
readonly status: 404;
|
|
40
|
+
readonly code: "NOT_FOUND";
|
|
41
|
+
readonly defaultMessage: "The requested resource was not found.";
|
|
42
|
+
readonly expose: true;
|
|
43
|
+
};
|
|
44
|
+
readonly methodNotAllowed: {
|
|
45
|
+
readonly status: 405;
|
|
46
|
+
readonly code: "METHOD_NOT_ALLOWED";
|
|
47
|
+
readonly defaultMessage: "The requested method is not allowed for this resource.";
|
|
48
|
+
readonly expose: true;
|
|
49
|
+
};
|
|
50
|
+
readonly conflict: {
|
|
51
|
+
readonly status: 409;
|
|
52
|
+
readonly code: "CONFLICT";
|
|
53
|
+
readonly defaultMessage: "The request conflicts with the current state of the resource.";
|
|
54
|
+
readonly expose: true;
|
|
55
|
+
};
|
|
56
|
+
readonly preconditionFailed: {
|
|
57
|
+
readonly status: 412;
|
|
58
|
+
readonly code: "PRECONDITION_FAILED";
|
|
59
|
+
readonly defaultMessage: "A precondition for this request failed.";
|
|
60
|
+
readonly expose: true;
|
|
61
|
+
};
|
|
62
|
+
readonly payloadTooLarge: {
|
|
63
|
+
readonly status: 413;
|
|
64
|
+
readonly code: "PAYLOAD_TOO_LARGE";
|
|
65
|
+
readonly defaultMessage: "The request payload is larger than the server is willing to process.";
|
|
66
|
+
readonly expose: true;
|
|
67
|
+
};
|
|
68
|
+
readonly unsupportedMediaType: {
|
|
69
|
+
readonly status: 415;
|
|
70
|
+
readonly code: "UNSUPPORTED_MEDIA_TYPE";
|
|
71
|
+
readonly defaultMessage: "The request payload format is not supported by this resource.";
|
|
72
|
+
readonly expose: true;
|
|
73
|
+
};
|
|
74
|
+
readonly rateLimited: {
|
|
75
|
+
readonly status: 429;
|
|
76
|
+
readonly code: "RATE_LIMITED";
|
|
77
|
+
readonly defaultMessage: "Too many requests — slow down and retry later.";
|
|
78
|
+
readonly expose: true;
|
|
79
|
+
};
|
|
80
|
+
readonly internalServerError: {
|
|
81
|
+
readonly status: 500;
|
|
82
|
+
readonly code: "INTERNAL_SERVER_ERROR";
|
|
83
|
+
readonly defaultMessage: "The server encountered an internal error and was unable to complete your request.";
|
|
84
|
+
readonly expose: false;
|
|
85
|
+
};
|
|
86
|
+
readonly notImplemented: {
|
|
87
|
+
readonly status: 501;
|
|
88
|
+
readonly code: "NOT_IMPLEMENTED";
|
|
89
|
+
readonly defaultMessage: "The server does not support the functionality required to fulfil this request.";
|
|
90
|
+
readonly expose: false;
|
|
91
|
+
};
|
|
92
|
+
readonly badGateway: {
|
|
93
|
+
readonly status: 502;
|
|
94
|
+
readonly code: "BAD_GATEWAY";
|
|
95
|
+
readonly defaultMessage: "The server received an invalid response from an upstream service.";
|
|
96
|
+
readonly expose: false;
|
|
97
|
+
};
|
|
98
|
+
readonly serviceUnavailable: {
|
|
99
|
+
readonly status: 503;
|
|
100
|
+
readonly code: "SERVICE_UNAVAILABLE";
|
|
101
|
+
readonly defaultMessage: "The server is currently unable to handle the request — retry after a delay.";
|
|
102
|
+
readonly expose: true;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
type HttpErrorType = keyof typeof CATALOG;
|
|
106
|
+
export { CATALOG };
|
|
107
|
+
export type { HttpErrorDefinition, HttpErrorType };
|
|
108
|
+
//# sourceMappingURL=CATALOG.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CATALOG.d.ts","sourceRoot":"","sources":["../src/CATALOG.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,UAAU,mBAAmB;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyF2C,CAAC;AAEzD,KAAK,aAAa,GAAG,MAAM,OAAO,OAAO,CAAC;AAE1C,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/CATALOG.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
const CATALOG = {
|
|
2
|
+
badRequest: {
|
|
3
|
+
status: 400,
|
|
4
|
+
code: 'BAD_REQUEST',
|
|
5
|
+
defaultMessage: 'The request could not be understood or was missing required parameters.',
|
|
6
|
+
expose: true,
|
|
7
|
+
},
|
|
8
|
+
unauthorized: {
|
|
9
|
+
status: 401,
|
|
10
|
+
code: 'UNAUTHORIZED',
|
|
11
|
+
defaultMessage: 'Authentication is required and has failed or has not yet been provided.',
|
|
12
|
+
expose: true,
|
|
13
|
+
},
|
|
14
|
+
forbidden: {
|
|
15
|
+
status: 403,
|
|
16
|
+
code: 'FORBIDDEN',
|
|
17
|
+
defaultMessage: 'You do not have permission to perform this action.',
|
|
18
|
+
expose: true,
|
|
19
|
+
},
|
|
20
|
+
notFound: {
|
|
21
|
+
status: 404,
|
|
22
|
+
code: 'NOT_FOUND',
|
|
23
|
+
defaultMessage: 'The requested resource was not found.',
|
|
24
|
+
expose: true,
|
|
25
|
+
},
|
|
26
|
+
methodNotAllowed: {
|
|
27
|
+
status: 405,
|
|
28
|
+
code: 'METHOD_NOT_ALLOWED',
|
|
29
|
+
defaultMessage: 'The requested method is not allowed for this resource.',
|
|
30
|
+
expose: true,
|
|
31
|
+
},
|
|
32
|
+
conflict: {
|
|
33
|
+
// Distinct from `badRequest` so callers can tell "invalid input" from
|
|
34
|
+
// "that value is taken" — the latter never succeeds without a change.
|
|
35
|
+
status: 409,
|
|
36
|
+
code: 'CONFLICT',
|
|
37
|
+
defaultMessage: 'The request conflicts with the current state of the resource.',
|
|
38
|
+
expose: true,
|
|
39
|
+
},
|
|
40
|
+
preconditionFailed: {
|
|
41
|
+
status: 412,
|
|
42
|
+
code: 'PRECONDITION_FAILED',
|
|
43
|
+
defaultMessage: 'A precondition for this request failed.',
|
|
44
|
+
expose: true,
|
|
45
|
+
},
|
|
46
|
+
payloadTooLarge: {
|
|
47
|
+
status: 413,
|
|
48
|
+
code: 'PAYLOAD_TOO_LARGE',
|
|
49
|
+
defaultMessage: 'The request payload is larger than the server is willing to process.',
|
|
50
|
+
expose: true,
|
|
51
|
+
},
|
|
52
|
+
unsupportedMediaType: {
|
|
53
|
+
status: 415,
|
|
54
|
+
code: 'UNSUPPORTED_MEDIA_TYPE',
|
|
55
|
+
defaultMessage: 'The request payload format is not supported by this resource.',
|
|
56
|
+
expose: true,
|
|
57
|
+
},
|
|
58
|
+
rateLimited: {
|
|
59
|
+
status: 429,
|
|
60
|
+
code: 'RATE_LIMITED',
|
|
61
|
+
defaultMessage: 'Too many requests — slow down and retry later.',
|
|
62
|
+
expose: true,
|
|
63
|
+
},
|
|
64
|
+
internalServerError: {
|
|
65
|
+
status: 500,
|
|
66
|
+
code: 'INTERNAL_SERVER_ERROR',
|
|
67
|
+
defaultMessage: 'The server encountered an internal error and was unable to complete your request.',
|
|
68
|
+
expose: false,
|
|
69
|
+
},
|
|
70
|
+
notImplemented: {
|
|
71
|
+
status: 501,
|
|
72
|
+
code: 'NOT_IMPLEMENTED',
|
|
73
|
+
defaultMessage: 'The server does not support the functionality required to fulfil this request.',
|
|
74
|
+
expose: false,
|
|
75
|
+
},
|
|
76
|
+
// Upstream dependency failures: 502 is the honest status here, and the
|
|
77
|
+
// retryable marker (not the status) is what schedules a retry.
|
|
78
|
+
badGateway: {
|
|
79
|
+
status: 502,
|
|
80
|
+
code: 'BAD_GATEWAY',
|
|
81
|
+
defaultMessage: 'The server received an invalid response from an upstream service.',
|
|
82
|
+
expose: false,
|
|
83
|
+
},
|
|
84
|
+
serviceUnavailable: {
|
|
85
|
+
status: 503,
|
|
86
|
+
code: 'SERVICE_UNAVAILABLE',
|
|
87
|
+
defaultMessage: 'The server is currently unable to handle the request — retry after a delay.',
|
|
88
|
+
expose: true,
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
export { CATALOG };
|
|
92
|
+
//# sourceMappingURL=CATALOG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CATALOG.js","sourceRoot":"","sources":["../src/CATALOG.ts"],"names":[],"mappings":"AAmBA,MAAM,OAAO,GAAG;IACd,UAAU,EAAE;QACV,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,aAAa;QACnB,cAAc,EAAE,yEAAyE;QACzF,MAAM,EAAE,IAAI;KACb;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,cAAc;QACpB,cAAc,EAAE,yEAAyE;QACzF,MAAM,EAAE,IAAI;KACb;IACD,SAAS,EAAE;QACT,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,WAAW;QACjB,cAAc,EAAE,oDAAoD;QACpE,MAAM,EAAE,IAAI;KACb;IACD,QAAQ,EAAE;QACR,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,WAAW;QACjB,cAAc,EAAE,uCAAuC;QACvD,MAAM,EAAE,IAAI;KACb;IACD,gBAAgB,EAAE;QAChB,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,oBAAoB;QAC1B,cAAc,EAAE,wDAAwD;QACxE,MAAM,EAAE,IAAI;KACb;IACD,QAAQ,EAAE;QACR,sEAAsE;QACtE,sEAAsE;QACtE,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,UAAU;QAChB,cAAc,EAAE,+DAA+D;QAC/E,MAAM,EAAE,IAAI;KACb;IACD,kBAAkB,EAAE;QAClB,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,qBAAqB;QAC3B,cAAc,EAAE,yCAAyC;QACzD,MAAM,EAAE,IAAI;KACb;IACD,eAAe,EAAE;QACf,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,mBAAmB;QACzB,cAAc,EAAE,sEAAsE;QACtF,MAAM,EAAE,IAAI;KACb;IACD,oBAAoB,EAAE;QACpB,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,wBAAwB;QAC9B,cAAc,EAAE,+DAA+D;QAC/E,MAAM,EAAE,IAAI;KACb;IACD,WAAW,EAAE;QACX,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,cAAc;QACpB,cAAc,EAAE,gDAAgD;QAChE,MAAM,EAAE,IAAI;KACb;IACD,mBAAmB,EAAE;QACnB,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,uBAAuB;QAC7B,cAAc,EAAE,mFAAmF;QACnG,MAAM,EAAE,KAAK;KACd;IACD,cAAc,EAAE;QACd,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,iBAAiB;QACvB,cAAc,EAAE,gFAAgF;QAChG,MAAM,EAAE,KAAK;KACd;IACD,uEAAuE;IACvE,+DAA+D;IAC/D,UAAU,EAAE;QACV,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,aAAa;QACnB,cAAc,EAAE,mEAAmE;QACnF,MAAM,EAAE,KAAK;KACd;IACD,kBAAkB,EAAE;QAClB,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,qBAAqB;QAC3B,cAAc,EAAE,6EAA6E;QAC7F,MAAM,EAAE,IAAI;KACb;CACqD,CAAC;AAIzD,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HttpServiceError } from './HttpServiceError';
|
|
2
|
+
/**
|
|
3
|
+
* 409 — well-formed but the resource state forbids it: a taken email, a
|
|
4
|
+
* duplicate name, a stale precondition. Not retryable without a change.
|
|
5
|
+
*/
|
|
6
|
+
declare class ConflictError extends HttpServiceError<'conflict'> {
|
|
7
|
+
constructor(message?: string);
|
|
8
|
+
}
|
|
9
|
+
export { ConflictError };
|
|
10
|
+
//# sourceMappingURL=ConflictError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConflictError.d.ts","sourceRoot":"","sources":["../src/ConflictError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;GAGG;AACH,cAAM,aAAc,SAAQ,gBAAgB,CAAC,UAAU,CAAC;gBAC1C,OAAO,CAAC,EAAE,MAAM;CAG7B;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HttpServiceError } from './HttpServiceError';
|
|
2
|
+
/**
|
|
3
|
+
* 409 — well-formed but the resource state forbids it: a taken email, a
|
|
4
|
+
* duplicate name, a stale precondition. Not retryable without a change.
|
|
5
|
+
*/
|
|
6
|
+
class ConflictError extends HttpServiceError {
|
|
7
|
+
constructor(message) {
|
|
8
|
+
super('conflict', message);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export { ConflictError };
|
|
12
|
+
//# sourceMappingURL=ConflictError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConflictError.js","sourceRoot":"","sources":["../src/ConflictError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;GAGG;AACH,MAAM,aAAc,SAAQ,gBAA4B;IACtD,YAAY,OAAgB;QAC1B,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC7B,CAAC;CACF;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { InternalServerError } from './InternalServerError';
|
|
2
|
+
/**
|
|
3
|
+
* 500 for data-layer failures.
|
|
4
|
+
*
|
|
5
|
+
* Carries `retryable` because the difference between a transient D1 lock and a
|
|
6
|
+
* constraint violation is invisible in the message — the caller's retry
|
|
7
|
+
* decision (the DAO's) is encoded here as a flag instead of re-parsed at every
|
|
8
|
+
* boundary.
|
|
9
|
+
*/
|
|
10
|
+
declare class DatabaseError extends InternalServerError {
|
|
11
|
+
constructor(message?: string, retryable?: boolean, options?: {
|
|
12
|
+
cause?: unknown;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export { DatabaseError };
|
|
16
|
+
//# sourceMappingURL=DatabaseError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatabaseError.d.ts","sourceRoot":"","sources":["../src/DatabaseError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;;;;;GAOG;AACH,cAAM,aAAc,SAAQ,mBAAmB;gBACjC,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,GAAE,OAAe,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAKxF;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { InternalServerError } from './InternalServerError';
|
|
2
|
+
/**
|
|
3
|
+
* 500 for data-layer failures.
|
|
4
|
+
*
|
|
5
|
+
* Carries `retryable` because the difference between a transient D1 lock and a
|
|
6
|
+
* constraint violation is invisible in the message — the caller's retry
|
|
7
|
+
* decision (the DAO's) is encoded here as a flag instead of re-parsed at every
|
|
8
|
+
* boundary.
|
|
9
|
+
*/
|
|
10
|
+
class DatabaseError extends InternalServerError {
|
|
11
|
+
constructor(message, retryable = false, options) {
|
|
12
|
+
super(message ?? 'The system encountered an unexpected problem while accessing the database.', options);
|
|
13
|
+
this.retryable = retryable;
|
|
14
|
+
this.type = 'DatabaseError';
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export { DatabaseError };
|
|
18
|
+
//# sourceMappingURL=DatabaseError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatabaseError.js","sourceRoot":"","sources":["../src/DatabaseError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;;;;;GAOG;AACH,MAAM,aAAc,SAAQ,mBAAmB;IAC7C,YAAY,OAAgB,EAAE,YAAqB,KAAK,EAAE,OAA6B;QACrF,KAAK,CAAC,OAAO,IAAI,4EAA4E,EAAE,OAAO,CAAC,CAAC;QACxG,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The AWS-style error envelope: `{ "Exception": { "Type": "...", "Message": "..." } }`.
|
|
3
|
+
*
|
|
4
|
+
* Optional members tolerate foreign or truncated payloads during
|
|
5
|
+
* deserialization; serializers always emit both fields. The envelope is the
|
|
6
|
+
* family's established wire format — the kit's `toErrorResponse()` owns it so
|
|
7
|
+
* per-app route layers stop hand-rolling it.
|
|
8
|
+
*/
|
|
9
|
+
interface ErrorResponse {
|
|
10
|
+
Exception?: {
|
|
11
|
+
Type?: string;
|
|
12
|
+
Message?: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export type { ErrorResponse };
|
|
16
|
+
//# sourceMappingURL=ErrorResponse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorResponse.d.ts","sourceRoot":"","sources":["../src/ErrorResponse.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,UAAU,aAAa;IACrB,SAAS,CAAC,EAAE;QACV,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorResponse.js","sourceRoot":"","sources":["../src/ErrorResponse.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HttpServiceError } from './HttpServiceError';
|
|
2
|
+
/**
|
|
3
|
+
* 403 — the caller is authenticated but the action is not theirs to take.
|
|
4
|
+
*/
|
|
5
|
+
declare class ForbiddenError extends HttpServiceError<'forbidden'> {
|
|
6
|
+
constructor(message?: string);
|
|
7
|
+
}
|
|
8
|
+
export { ForbiddenError };
|
|
9
|
+
//# sourceMappingURL=ForbiddenError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ForbiddenError.d.ts","sourceRoot":"","sources":["../src/ForbiddenError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,cAAM,cAAe,SAAQ,gBAAgB,CAAC,WAAW,CAAC;gBAC5C,OAAO,CAAC,EAAE,MAAM;CAG7B;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpServiceError } from './HttpServiceError';
|
|
2
|
+
/**
|
|
3
|
+
* 403 — the caller is authenticated but the action is not theirs to take.
|
|
4
|
+
*/
|
|
5
|
+
class ForbiddenError extends HttpServiceError {
|
|
6
|
+
constructor(message) {
|
|
7
|
+
super('forbidden', message);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export { ForbiddenError };
|
|
11
|
+
//# sourceMappingURL=ForbiddenError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ForbiddenError.js","sourceRoot":"","sources":["../src/ForbiddenError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,MAAM,cAAe,SAAQ,gBAA6B;IACxD,YAAY,OAAgB;QAC1B,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC9B,CAAC;CACF;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HttpErrorType } from './CATALOG';
|
|
2
|
+
import { ServiceError } from './ServiceError';
|
|
3
|
+
import type { ServiceErrorOptions } from './ServiceError';
|
|
4
|
+
/**
|
|
5
|
+
* A `ServiceError` with a fixed HTTP status and type from the catalog.
|
|
6
|
+
*
|
|
7
|
+
* Concrete subclasses add nothing but a name, so they are one-liners:
|
|
8
|
+
* `class NotFoundError extends HttpServiceError<'notFound'> {}`.
|
|
9
|
+
*/
|
|
10
|
+
declare abstract class HttpServiceError<TType extends HttpErrorType> extends ServiceError {
|
|
11
|
+
constructor(errorType: TType, message?: string, options?: ServiceErrorOptions);
|
|
12
|
+
}
|
|
13
|
+
export { HttpServiceError };
|
|
14
|
+
//# sourceMappingURL=HttpServiceError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpServiceError.d.ts","sourceRoot":"","sources":["../src/HttpServiceError.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D;;;;;GAKG;AACH,uBAAe,gBAAgB,CAAC,KAAK,SAAS,aAAa,CAAE,SAAQ,YAAY;gBACnE,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB;CAI9E;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CATALOG } from './CATALOG';
|
|
2
|
+
import { ServiceError } from './ServiceError';
|
|
3
|
+
/**
|
|
4
|
+
* A `ServiceError` with a fixed HTTP status and type from the catalog.
|
|
5
|
+
*
|
|
6
|
+
* Concrete subclasses add nothing but a name, so they are one-liners:
|
|
7
|
+
* `class NotFoundError extends HttpServiceError<'notFound'> {}`.
|
|
8
|
+
*/
|
|
9
|
+
class HttpServiceError extends ServiceError {
|
|
10
|
+
constructor(errorType, message, options) {
|
|
11
|
+
const definition = CATALOG[errorType];
|
|
12
|
+
super(definition.status, errorType, message ?? definition.defaultMessage, options);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export { HttpServiceError };
|
|
16
|
+
//# sourceMappingURL=HttpServiceError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpServiceError.js","sourceRoot":"","sources":["../src/HttpServiceError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C;;;;;GAKG;AACH,MAAe,gBAA8C,SAAQ,YAAY;IAC/E,YAAY,SAAgB,EAAE,OAAgB,EAAE,OAA6B;QAC3E,MAAM,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;QACtC,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,IAAI,UAAU,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC;CACF;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HttpServiceError } from './HttpServiceError';
|
|
2
|
+
/**
|
|
3
|
+
* 500 — the catch-all server fault.
|
|
4
|
+
*/
|
|
5
|
+
declare class InternalServerError extends HttpServiceError<'internalServerError'> {
|
|
6
|
+
constructor(message?: string, options?: {
|
|
7
|
+
cause?: unknown;
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The instance returned to callers when the real cause must not be disclosed:
|
|
12
|
+
* same stable type, generic message, regardless of what failed.
|
|
13
|
+
*/
|
|
14
|
+
declare const DefaultInternalServerError: InternalServerError;
|
|
15
|
+
export { InternalServerError, DefaultInternalServerError };
|
|
16
|
+
//# sourceMappingURL=InternalServerError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InternalServerError.d.ts","sourceRoot":"","sources":["../src/InternalServerError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,cAAM,mBAAoB,SAAQ,gBAAgB,CAAC,qBAAqB,CAAC;gBAC3D,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAG5D;AAED;;;GAGG;AACH,QAAA,MAAM,0BAA0B,qBAA4B,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HttpServiceError } from './HttpServiceError';
|
|
2
|
+
/**
|
|
3
|
+
* 500 — the catch-all server fault.
|
|
4
|
+
*/
|
|
5
|
+
class InternalServerError extends HttpServiceError {
|
|
6
|
+
constructor(message, options) {
|
|
7
|
+
super('internalServerError', message, options);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The instance returned to callers when the real cause must not be disclosed:
|
|
12
|
+
* same stable type, generic message, regardless of what failed.
|
|
13
|
+
*/
|
|
14
|
+
const DefaultInternalServerError = new InternalServerError();
|
|
15
|
+
export { InternalServerError, DefaultInternalServerError };
|
|
16
|
+
//# sourceMappingURL=InternalServerError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InternalServerError.js","sourceRoot":"","sources":["../src/InternalServerError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,MAAM,mBAAoB,SAAQ,gBAAuC;IACvE,YAAY,OAAgB,EAAE,OAA6B;QACzD,KAAK,CAAC,qBAAqB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,0BAA0B,GAAG,IAAI,mBAAmB,EAAE,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HttpServiceError } from './HttpServiceError';
|
|
2
|
+
/**
|
|
3
|
+
* 405 — the method exists but not on this path.
|
|
4
|
+
*/
|
|
5
|
+
declare class MethodNotAllowedError extends HttpServiceError<'methodNotAllowed'> {
|
|
6
|
+
constructor(message?: string);
|
|
7
|
+
}
|
|
8
|
+
export { MethodNotAllowedError };
|
|
9
|
+
//# sourceMappingURL=MethodNotAllowedError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MethodNotAllowedError.d.ts","sourceRoot":"","sources":["../src/MethodNotAllowedError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,cAAM,qBAAsB,SAAQ,gBAAgB,CAAC,kBAAkB,CAAC;gBAC1D,OAAO,CAAC,EAAE,MAAM;CAG7B;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpServiceError } from './HttpServiceError';
|
|
2
|
+
/**
|
|
3
|
+
* 405 — the method exists but not on this path.
|
|
4
|
+
*/
|
|
5
|
+
class MethodNotAllowedError extends HttpServiceError {
|
|
6
|
+
constructor(message) {
|
|
7
|
+
super('methodNotAllowed', message);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export { MethodNotAllowedError };
|
|
11
|
+
//# sourceMappingURL=MethodNotAllowedError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MethodNotAllowedError.js","sourceRoot":"","sources":["../src/MethodNotAllowedError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,MAAM,qBAAsB,SAAQ,gBAAoC;IACtE,YAAY,OAAgB;QAC1B,KAAK,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;CACF;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HttpServiceError } from './HttpServiceError';
|
|
2
|
+
/**
|
|
3
|
+
* 404 — no such resource.
|
|
4
|
+
*/
|
|
5
|
+
declare class NotFoundError extends HttpServiceError<'notFound'> {
|
|
6
|
+
constructor(message?: string);
|
|
7
|
+
}
|
|
8
|
+
export { NotFoundError };
|
|
9
|
+
//# sourceMappingURL=NotFoundError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotFoundError.d.ts","sourceRoot":"","sources":["../src/NotFoundError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,cAAM,aAAc,SAAQ,gBAAgB,CAAC,UAAU,CAAC;gBAC1C,OAAO,CAAC,EAAE,MAAM;CAG7B;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpServiceError } from './HttpServiceError';
|
|
2
|
+
/**
|
|
3
|
+
* 404 — no such resource.
|
|
4
|
+
*/
|
|
5
|
+
class NotFoundError extends HttpServiceError {
|
|
6
|
+
constructor(message) {
|
|
7
|
+
super('notFound', message);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export { NotFoundError };
|
|
11
|
+
//# sourceMappingURL=NotFoundError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotFoundError.js","sourceRoot":"","sources":["../src/NotFoundError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,MAAM,aAAc,SAAQ,gBAA4B;IACtD,YAAY,OAAgB;QAC1B,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC7B,CAAC;CACF;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HttpServiceError } from './HttpServiceError';
|
|
2
|
+
/**
|
|
3
|
+
* 501 — the functionality exists in the protocol but not on this deployment.
|
|
4
|
+
*/
|
|
5
|
+
declare class NotImplementedError extends HttpServiceError<'notImplemented'> {
|
|
6
|
+
constructor(message?: string);
|
|
7
|
+
}
|
|
8
|
+
export { NotImplementedError };
|
|
9
|
+
//# sourceMappingURL=NotImplementedError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotImplementedError.d.ts","sourceRoot":"","sources":["../src/NotImplementedError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,cAAM,mBAAoB,SAAQ,gBAAgB,CAAC,gBAAgB,CAAC;gBACtD,OAAO,CAAC,EAAE,MAAM;CAG7B;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpServiceError } from './HttpServiceError';
|
|
2
|
+
/**
|
|
3
|
+
* 501 — the functionality exists in the protocol but not on this deployment.
|
|
4
|
+
*/
|
|
5
|
+
class NotImplementedError extends HttpServiceError {
|
|
6
|
+
constructor(message) {
|
|
7
|
+
super('notImplemented', message);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export { NotImplementedError };
|
|
11
|
+
//# sourceMappingURL=NotImplementedError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotImplementedError.js","sourceRoot":"","sources":["../src/NotImplementedError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,MAAM,mBAAoB,SAAQ,gBAAkC;IAClE,YAAY,OAAgB;QAC1B,KAAK,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC;CACF;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|