@eggjs/errors 0.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.
Files changed (109) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +258 -0
  3. package/dist/base.d.ts +22 -0
  4. package/dist/base.js +35 -0
  5. package/dist/base_error.d.ts +9 -0
  6. package/dist/base_error.js +13 -0
  7. package/dist/base_exception.d.ts +9 -0
  8. package/dist/base_exception.js +13 -0
  9. package/dist/error.d.ts +9 -0
  10. package/dist/error.js +14 -0
  11. package/dist/error_options.d.ts +8 -0
  12. package/dist/error_options.js +8 -0
  13. package/dist/error_type.d.ts +18 -0
  14. package/dist/error_type.js +9 -0
  15. package/dist/exception.d.ts +9 -0
  16. package/dist/exception.js +14 -0
  17. package/dist/framework/formatter.d.ts +12 -0
  18. package/dist/framework/formatter.js +28 -0
  19. package/dist/framework/framework_base_error.d.ts +15 -0
  20. package/dist/framework/framework_base_error.js +37 -0
  21. package/dist/http/400.d.ts +8 -0
  22. package/dist/http/400.js +18 -0
  23. package/dist/http/401.d.ts +8 -0
  24. package/dist/http/401.js +18 -0
  25. package/dist/http/402.d.ts +8 -0
  26. package/dist/http/402.js +18 -0
  27. package/dist/http/403.d.ts +8 -0
  28. package/dist/http/403.js +18 -0
  29. package/dist/http/404.d.ts +8 -0
  30. package/dist/http/404.js +18 -0
  31. package/dist/http/405.d.ts +8 -0
  32. package/dist/http/405.js +18 -0
  33. package/dist/http/406.d.ts +8 -0
  34. package/dist/http/406.js +18 -0
  35. package/dist/http/407.d.ts +8 -0
  36. package/dist/http/407.js +18 -0
  37. package/dist/http/408.d.ts +8 -0
  38. package/dist/http/408.js +18 -0
  39. package/dist/http/409.d.ts +8 -0
  40. package/dist/http/409.js +18 -0
  41. package/dist/http/410.d.ts +8 -0
  42. package/dist/http/410.js +18 -0
  43. package/dist/http/411.d.ts +8 -0
  44. package/dist/http/411.js +18 -0
  45. package/dist/http/412.d.ts +8 -0
  46. package/dist/http/412.js +18 -0
  47. package/dist/http/413.d.ts +8 -0
  48. package/dist/http/413.js +18 -0
  49. package/dist/http/414.d.ts +8 -0
  50. package/dist/http/414.js +18 -0
  51. package/dist/http/415.d.ts +8 -0
  52. package/dist/http/415.js +18 -0
  53. package/dist/http/416.d.ts +8 -0
  54. package/dist/http/416.js +18 -0
  55. package/dist/http/417.d.ts +8 -0
  56. package/dist/http/417.js +18 -0
  57. package/dist/http/418.d.ts +8 -0
  58. package/dist/http/418.js +18 -0
  59. package/dist/http/421.d.ts +8 -0
  60. package/dist/http/421.js +18 -0
  61. package/dist/http/422.d.ts +8 -0
  62. package/dist/http/422.js +18 -0
  63. package/dist/http/423.d.ts +8 -0
  64. package/dist/http/423.js +18 -0
  65. package/dist/http/424.d.ts +8 -0
  66. package/dist/http/424.js +18 -0
  67. package/dist/http/425.d.ts +8 -0
  68. package/dist/http/425.js +18 -0
  69. package/dist/http/426.d.ts +8 -0
  70. package/dist/http/426.js +18 -0
  71. package/dist/http/428.d.ts +8 -0
  72. package/dist/http/428.js +18 -0
  73. package/dist/http/429.d.ts +8 -0
  74. package/dist/http/429.js +18 -0
  75. package/dist/http/431.d.ts +8 -0
  76. package/dist/http/431.js +18 -0
  77. package/dist/http/451.d.ts +8 -0
  78. package/dist/http/451.js +18 -0
  79. package/dist/http/500.d.ts +8 -0
  80. package/dist/http/500.js +18 -0
  81. package/dist/http/501.d.ts +8 -0
  82. package/dist/http/501.js +18 -0
  83. package/dist/http/502.d.ts +8 -0
  84. package/dist/http/502.js +18 -0
  85. package/dist/http/503.d.ts +8 -0
  86. package/dist/http/503.js +18 -0
  87. package/dist/http/504.d.ts +8 -0
  88. package/dist/http/504.js +18 -0
  89. package/dist/http/505.d.ts +8 -0
  90. package/dist/http/505.js +18 -0
  91. package/dist/http/506.d.ts +8 -0
  92. package/dist/http/506.js +18 -0
  93. package/dist/http/507.d.ts +8 -0
  94. package/dist/http/507.js +18 -0
  95. package/dist/http/508.d.ts +8 -0
  96. package/dist/http/508.js +18 -0
  97. package/dist/http/509.d.ts +8 -0
  98. package/dist/http/509.js +18 -0
  99. package/dist/http/510.d.ts +8 -0
  100. package/dist/http/510.js +18 -0
  101. package/dist/http/511.d.ts +8 -0
  102. package/dist/http/511.js +18 -0
  103. package/dist/http/http_error.d.ts +13 -0
  104. package/dist/http/http_error.js +16 -0
  105. package/dist/http/http_error_options.d.ts +10 -0
  106. package/dist/http/http_header.d.ts +6 -0
  107. package/dist/index.d.ts +51 -0
  108. package/dist/index.js +52 -0
  109. package/package.json +52 -0
@@ -0,0 +1,18 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/428.ts
4
+ var PreconditionRequiredError = class extends HttpError {
5
+ constructor(message) {
6
+ const status = 428;
7
+ const code = "PRECONDITION_REQUIRED";
8
+ message = message ?? "Precondition Required";
9
+ super({
10
+ code,
11
+ message,
12
+ status
13
+ });
14
+ }
15
+ };
16
+
17
+ //#endregion
18
+ export { PreconditionRequiredError };
@@ -0,0 +1,8 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/429.d.ts
4
+ declare class TooManyRequestsError extends HttpError {
5
+ constructor(message?: string);
6
+ }
7
+ //#endregion
8
+ export { TooManyRequestsError };
@@ -0,0 +1,18 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/429.ts
4
+ var TooManyRequestsError = class extends HttpError {
5
+ constructor(message) {
6
+ const status = 429;
7
+ const code = "TOO_MANY_REQUESTS";
8
+ message = message ?? "Too Many Requests";
9
+ super({
10
+ code,
11
+ message,
12
+ status
13
+ });
14
+ }
15
+ };
16
+
17
+ //#endregion
18
+ export { TooManyRequestsError };
@@ -0,0 +1,8 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/431.d.ts
4
+ declare class RequestHeaderFieldsTooLargeError extends HttpError {
5
+ constructor(message?: string);
6
+ }
7
+ //#endregion
8
+ export { RequestHeaderFieldsTooLargeError };
@@ -0,0 +1,18 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/431.ts
4
+ var RequestHeaderFieldsTooLargeError = class extends HttpError {
5
+ constructor(message) {
6
+ const status = 431;
7
+ const code = "REQUEST_HEADER_FIELDS_TOO_LARGE";
8
+ message = message ?? "Request Header Fields Too Large";
9
+ super({
10
+ code,
11
+ message,
12
+ status
13
+ });
14
+ }
15
+ };
16
+
17
+ //#endregion
18
+ export { RequestHeaderFieldsTooLargeError };
@@ -0,0 +1,8 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/451.d.ts
4
+ declare class UnavailableForLegalReasonsError extends HttpError {
5
+ constructor(message?: string);
6
+ }
7
+ //#endregion
8
+ export { UnavailableForLegalReasonsError };
@@ -0,0 +1,18 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/451.ts
4
+ var UnavailableForLegalReasonsError = class extends HttpError {
5
+ constructor(message) {
6
+ const status = 451;
7
+ const code = "UNAVAILABLE_FOR_LEGAL_REASONS";
8
+ message = message ?? "Unavailable For Legal Reasons";
9
+ super({
10
+ code,
11
+ message,
12
+ status
13
+ });
14
+ }
15
+ };
16
+
17
+ //#endregion
18
+ export { UnavailableForLegalReasonsError };
@@ -0,0 +1,8 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/500.d.ts
4
+ declare class InternalServerError extends HttpError {
5
+ constructor(message?: string);
6
+ }
7
+ //#endregion
8
+ export { InternalServerError };
@@ -0,0 +1,18 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/500.ts
4
+ var InternalServerError = class extends HttpError {
5
+ constructor(message) {
6
+ const status = 500;
7
+ const code = "INTERNAL_SERVER_ERROR";
8
+ message = message ?? "Internal Server Error";
9
+ super({
10
+ code,
11
+ message,
12
+ status
13
+ });
14
+ }
15
+ };
16
+
17
+ //#endregion
18
+ export { InternalServerError };
@@ -0,0 +1,8 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/501.d.ts
4
+ declare class NotImplementedError extends HttpError {
5
+ constructor(message?: string);
6
+ }
7
+ //#endregion
8
+ export { NotImplementedError };
@@ -0,0 +1,18 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/501.ts
4
+ var NotImplementedError = class extends HttpError {
5
+ constructor(message) {
6
+ const status = 501;
7
+ const code = "NOT_IMPLEMENTED";
8
+ message = message ?? "Not Implemented";
9
+ super({
10
+ code,
11
+ message,
12
+ status
13
+ });
14
+ }
15
+ };
16
+
17
+ //#endregion
18
+ export { NotImplementedError };
@@ -0,0 +1,8 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/502.d.ts
4
+ declare class BadGatewayError extends HttpError {
5
+ constructor(message?: string);
6
+ }
7
+ //#endregion
8
+ export { BadGatewayError };
@@ -0,0 +1,18 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/502.ts
4
+ var BadGatewayError = class extends HttpError {
5
+ constructor(message) {
6
+ const status = 502;
7
+ const code = "BAD_GATEWAY";
8
+ message = message ?? "Bad Gateway";
9
+ super({
10
+ code,
11
+ message,
12
+ status
13
+ });
14
+ }
15
+ };
16
+
17
+ //#endregion
18
+ export { BadGatewayError };
@@ -0,0 +1,8 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/503.d.ts
4
+ declare class ServiceUnavailableError extends HttpError {
5
+ constructor(message?: string);
6
+ }
7
+ //#endregion
8
+ export { ServiceUnavailableError };
@@ -0,0 +1,18 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/503.ts
4
+ var ServiceUnavailableError = class extends HttpError {
5
+ constructor(message) {
6
+ const status = 503;
7
+ const code = "SERVICE_UNAVAILABLE";
8
+ message = message ?? "Service Unavailable";
9
+ super({
10
+ code,
11
+ message,
12
+ status
13
+ });
14
+ }
15
+ };
16
+
17
+ //#endregion
18
+ export { ServiceUnavailableError };
@@ -0,0 +1,8 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/504.d.ts
4
+ declare class GatewayTimeoutError extends HttpError {
5
+ constructor(message?: string);
6
+ }
7
+ //#endregion
8
+ export { GatewayTimeoutError };
@@ -0,0 +1,18 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/504.ts
4
+ var GatewayTimeoutError = class extends HttpError {
5
+ constructor(message) {
6
+ const status = 504;
7
+ const code = "GATEWAY_TIMEOUT";
8
+ message = message ?? "Gateway Timeout";
9
+ super({
10
+ code,
11
+ message,
12
+ status
13
+ });
14
+ }
15
+ };
16
+
17
+ //#endregion
18
+ export { GatewayTimeoutError };
@@ -0,0 +1,8 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/505.d.ts
4
+ declare class HTTPVersionNotSupportedError extends HttpError {
5
+ constructor(message?: string);
6
+ }
7
+ //#endregion
8
+ export { HTTPVersionNotSupportedError };
@@ -0,0 +1,18 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/505.ts
4
+ var HTTPVersionNotSupportedError = class extends HttpError {
5
+ constructor(message) {
6
+ const status = 505;
7
+ const code = "HTTP_VERSION_NOT_SUPPORTED";
8
+ message = message ?? "HTTP Version Not Supported";
9
+ super({
10
+ code,
11
+ message,
12
+ status
13
+ });
14
+ }
15
+ };
16
+
17
+ //#endregion
18
+ export { HTTPVersionNotSupportedError };
@@ -0,0 +1,8 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/506.d.ts
4
+ declare class VariantAlsoNegotiatesError extends HttpError {
5
+ constructor(message?: string);
6
+ }
7
+ //#endregion
8
+ export { VariantAlsoNegotiatesError };
@@ -0,0 +1,18 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/506.ts
4
+ var VariantAlsoNegotiatesError = class extends HttpError {
5
+ constructor(message) {
6
+ const status = 506;
7
+ const code = "VARIANT_ALSO_NEGOTIATES";
8
+ message = message ?? "Variant Also Negotiates";
9
+ super({
10
+ code,
11
+ message,
12
+ status
13
+ });
14
+ }
15
+ };
16
+
17
+ //#endregion
18
+ export { VariantAlsoNegotiatesError };
@@ -0,0 +1,8 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/507.d.ts
4
+ declare class InsufficientStorageError extends HttpError {
5
+ constructor(message?: string);
6
+ }
7
+ //#endregion
8
+ export { InsufficientStorageError };
@@ -0,0 +1,18 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/507.ts
4
+ var InsufficientStorageError = class extends HttpError {
5
+ constructor(message) {
6
+ const status = 507;
7
+ const code = "INSUFFICIENT_STORAGE";
8
+ message = message ?? "Insufficient Storage";
9
+ super({
10
+ code,
11
+ message,
12
+ status
13
+ });
14
+ }
15
+ };
16
+
17
+ //#endregion
18
+ export { InsufficientStorageError };
@@ -0,0 +1,8 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/508.d.ts
4
+ declare class LoopDetectedError extends HttpError {
5
+ constructor(message?: string);
6
+ }
7
+ //#endregion
8
+ export { LoopDetectedError };
@@ -0,0 +1,18 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/508.ts
4
+ var LoopDetectedError = class extends HttpError {
5
+ constructor(message) {
6
+ const status = 508;
7
+ const code = "LOOP_DETECTED";
8
+ message = message ?? "Loop Detected";
9
+ super({
10
+ code,
11
+ message,
12
+ status
13
+ });
14
+ }
15
+ };
16
+
17
+ //#endregion
18
+ export { LoopDetectedError };
@@ -0,0 +1,8 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/509.d.ts
4
+ declare class BandwidthLimitExceededError extends HttpError {
5
+ constructor(message?: string);
6
+ }
7
+ //#endregion
8
+ export { BandwidthLimitExceededError };
@@ -0,0 +1,18 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/509.ts
4
+ var BandwidthLimitExceededError = class extends HttpError {
5
+ constructor(message) {
6
+ const status = 509;
7
+ const code = "BANDWIDTH_LIMIT_EXCEEDED";
8
+ message = message ?? "Bandwidth Limit Exceeded";
9
+ super({
10
+ code,
11
+ message,
12
+ status
13
+ });
14
+ }
15
+ };
16
+
17
+ //#endregion
18
+ export { BandwidthLimitExceededError };
@@ -0,0 +1,8 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/510.d.ts
4
+ declare class NotExtendedError extends HttpError {
5
+ constructor(message?: string);
6
+ }
7
+ //#endregion
8
+ export { NotExtendedError };
@@ -0,0 +1,18 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/510.ts
4
+ var NotExtendedError = class extends HttpError {
5
+ constructor(message) {
6
+ const status = 510;
7
+ const code = "NOT_EXTENDED";
8
+ message = message ?? "Not Extended";
9
+ super({
10
+ code,
11
+ message,
12
+ status
13
+ });
14
+ }
15
+ };
16
+
17
+ //#endregion
18
+ export { NotExtendedError };
@@ -0,0 +1,8 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/511.d.ts
4
+ declare class NetworkAuthenticationRequiredError extends HttpError {
5
+ constructor(message?: string);
6
+ }
7
+ //#endregion
8
+ export { NetworkAuthenticationRequiredError };
@@ -0,0 +1,18 @@
1
+ import { HttpError } from "./http_error.js";
2
+
3
+ //#region src/http/511.ts
4
+ var NetworkAuthenticationRequiredError = class extends HttpError {
5
+ constructor(message) {
6
+ const status = 511;
7
+ const code = "NETWORK_AUTHENTICATION_REQUIRED";
8
+ message = message ?? "Network Authentication Required";
9
+ super({
10
+ code,
11
+ message,
12
+ status
13
+ });
14
+ }
15
+ };
16
+
17
+ //#endregion
18
+ export { NetworkAuthenticationRequiredError };
@@ -0,0 +1,13 @@
1
+ import { EggBaseError } from "../base_error.js";
2
+ import { HttpHeader } from "./http_header.js";
3
+ import { HttpErrorOptions } from "./http_error_options.js";
4
+
5
+ //#region src/http/http_error.d.ts
6
+ declare class HttpError extends EggBaseError<HttpErrorOptions> {
7
+ status: number;
8
+ headers: HttpHeader;
9
+ protected options: HttpErrorOptions;
10
+ constructor(options?: HttpErrorOptions);
11
+ }
12
+ //#endregion
13
+ export { HttpError };
@@ -0,0 +1,16 @@
1
+ import { EggBaseError } from "../base_error.js";
2
+
3
+ //#region src/http/http_error.ts
4
+ var HttpError = class extends EggBaseError {
5
+ status;
6
+ headers;
7
+ constructor(options) {
8
+ super(options);
9
+ this.headers = {};
10
+ this.status = this.options.status;
11
+ this.headers = this.options.headers ?? {};
12
+ }
13
+ };
14
+
15
+ //#endregion
16
+ export { HttpError };
@@ -0,0 +1,10 @@
1
+ import { ErrorOptions } from "../error_options.js";
2
+ import { HttpHeader } from "./http_header.js";
3
+
4
+ //#region src/http/http_error_options.d.ts
5
+ declare class HttpErrorOptions extends ErrorOptions {
6
+ status: number;
7
+ headers?: HttpHeader;
8
+ }
9
+ //#endregion
10
+ export { HttpErrorOptions };
@@ -0,0 +1,6 @@
1
+ //#region src/http/http_header.d.ts
2
+ interface HttpHeader {
3
+ [key: string]: any;
4
+ }
5
+ //#endregion
6
+ export { HttpHeader };
@@ -0,0 +1,51 @@
1
+ import { ErrorOptions } from "./error_options.js";
2
+ import { ErrorType } from "./error_type.js";
3
+ import { EggBaseError } from "./base_error.js";
4
+ import { EggBaseException } from "./base_exception.js";
5
+ import { EggError } from "./error.js";
6
+ import { EggException } from "./exception.js";
7
+ import { FRAMEWORK_ERROR_SYMBOL, FrameworkBaseError } from "./framework/framework_base_error.js";
8
+ import { FrameworkErrorFormater } from "./framework/formatter.js";
9
+ import { HttpError } from "./http/http_error.js";
10
+ import { BadRequestError } from "./http/400.js";
11
+ import { UnauthorizedError } from "./http/401.js";
12
+ import { PaymentRequiredError } from "./http/402.js";
13
+ import { ForbiddenError } from "./http/403.js";
14
+ import { NotFoundError } from "./http/404.js";
15
+ import { MethodNotAllowedError } from "./http/405.js";
16
+ import { NotAcceptableError } from "./http/406.js";
17
+ import { ProxyAuthenticationRequiredError } from "./http/407.js";
18
+ import { RequestTimeoutError } from "./http/408.js";
19
+ import { ConflictError } from "./http/409.js";
20
+ import { GoneError } from "./http/410.js";
21
+ import { LengthRequiredError } from "./http/411.js";
22
+ import { PreconditionFailedError } from "./http/412.js";
23
+ import { PayloadTooLargeError } from "./http/413.js";
24
+ import { URITooLongError } from "./http/414.js";
25
+ import { UnsupportedMediaTypeError } from "./http/415.js";
26
+ import { RangeNotSatisfiableError } from "./http/416.js";
27
+ import { ExpectationFailedError } from "./http/417.js";
28
+ import { ImATeapotError } from "./http/418.js";
29
+ import { MisdirectedRequestError } from "./http/421.js";
30
+ import { UnprocessableEntityError } from "./http/422.js";
31
+ import { LockedError } from "./http/423.js";
32
+ import { FailedDependencyError } from "./http/424.js";
33
+ import { UnorderedCollectionError } from "./http/425.js";
34
+ import { UpgradeRequiredError } from "./http/426.js";
35
+ import { PreconditionRequiredError } from "./http/428.js";
36
+ import { TooManyRequestsError } from "./http/429.js";
37
+ import { RequestHeaderFieldsTooLargeError } from "./http/431.js";
38
+ import { UnavailableForLegalReasonsError } from "./http/451.js";
39
+ import { InternalServerError } from "./http/500.js";
40
+ import { NotImplementedError } from "./http/501.js";
41
+ import { BadGatewayError } from "./http/502.js";
42
+ import { ServiceUnavailableError } from "./http/503.js";
43
+ import { GatewayTimeoutError } from "./http/504.js";
44
+ import { HTTPVersionNotSupportedError } from "./http/505.js";
45
+ import { VariantAlsoNegotiatesError } from "./http/506.js";
46
+ import { InsufficientStorageError } from "./http/507.js";
47
+ import { LoopDetectedError } from "./http/508.js";
48
+ import { BandwidthLimitExceededError } from "./http/509.js";
49
+ import { NotExtendedError } from "./http/510.js";
50
+ import { NetworkAuthenticationRequiredError } from "./http/511.js";
51
+ export { BadGatewayError, BadRequestError, BandwidthLimitExceededError, ConflictError, BadRequestError as E400, UnauthorizedError as E401, PaymentRequiredError as E402, ForbiddenError as E403, NotFoundError as E404, MethodNotAllowedError as E405, NotAcceptableError as E406, ProxyAuthenticationRequiredError as E407, RequestTimeoutError as E408, ConflictError as E409, GoneError as E410, LengthRequiredError as E411, PreconditionFailedError as E412, PayloadTooLargeError as E413, URITooLongError as E414, UnsupportedMediaTypeError as E415, RangeNotSatisfiableError as E416, ExpectationFailedError as E417, ImATeapotError as E418, MisdirectedRequestError as E421, UnprocessableEntityError as E422, LockedError as E423, FailedDependencyError as E424, UnorderedCollectionError as E425, UpgradeRequiredError as E426, PreconditionRequiredError as E428, TooManyRequestsError as E429, RequestHeaderFieldsTooLargeError as E431, UnavailableForLegalReasonsError as E451, InternalServerError as E500, NotImplementedError as E501, BadGatewayError as E502, ServiceUnavailableError as E503, GatewayTimeoutError as E504, HTTPVersionNotSupportedError as E505, VariantAlsoNegotiatesError as E506, InsufficientStorageError as E507, LoopDetectedError as E508, BandwidthLimitExceededError as E509, NotExtendedError as E510, NetworkAuthenticationRequiredError as E511, EggBaseError, EggBaseException, EggError, EggException, ErrorOptions, ErrorType, ExpectationFailedError, FRAMEWORK_ERROR_SYMBOL, FailedDependencyError, ForbiddenError, FrameworkBaseError, FrameworkErrorFormater, GatewayTimeoutError, GoneError, HTTPVersionNotSupportedError, HttpError, ImATeapotError, InsufficientStorageError, InternalServerError, LengthRequiredError, LockedError, LoopDetectedError, MethodNotAllowedError, MisdirectedRequestError, NetworkAuthenticationRequiredError, NotAcceptableError, NotExtendedError, NotFoundError, NotImplementedError, PayloadTooLargeError, PaymentRequiredError, PreconditionFailedError, PreconditionRequiredError, ProxyAuthenticationRequiredError, RangeNotSatisfiableError, RequestHeaderFieldsTooLargeError, RequestTimeoutError, ServiceUnavailableError, TooManyRequestsError, URITooLongError, UnauthorizedError, UnavailableForLegalReasonsError, UnorderedCollectionError, UnprocessableEntityError, UnsupportedMediaTypeError, UpgradeRequiredError, VariantAlsoNegotiatesError };
package/dist/index.js ADDED
@@ -0,0 +1,52 @@
1
+ import { ErrorOptions } from "./error_options.js";
2
+ import { ErrorType } from "./error_type.js";
3
+ import { EggBaseError } from "./base_error.js";
4
+ import { EggBaseException } from "./base_exception.js";
5
+ import { EggError } from "./error.js";
6
+ import { EggException } from "./exception.js";
7
+ import { FrameworkErrorFormater } from "./framework/formatter.js";
8
+ import { FRAMEWORK_ERROR_SYMBOL, FrameworkBaseError } from "./framework/framework_base_error.js";
9
+ import { HttpError } from "./http/http_error.js";
10
+ import { BadRequestError } from "./http/400.js";
11
+ import { UnauthorizedError } from "./http/401.js";
12
+ import { PaymentRequiredError } from "./http/402.js";
13
+ import { ForbiddenError } from "./http/403.js";
14
+ import { NotFoundError } from "./http/404.js";
15
+ import { MethodNotAllowedError } from "./http/405.js";
16
+ import { NotAcceptableError } from "./http/406.js";
17
+ import { ProxyAuthenticationRequiredError } from "./http/407.js";
18
+ import { RequestTimeoutError } from "./http/408.js";
19
+ import { ConflictError } from "./http/409.js";
20
+ import { GoneError } from "./http/410.js";
21
+ import { LengthRequiredError } from "./http/411.js";
22
+ import { PreconditionFailedError } from "./http/412.js";
23
+ import { PayloadTooLargeError } from "./http/413.js";
24
+ import { URITooLongError } from "./http/414.js";
25
+ import { UnsupportedMediaTypeError } from "./http/415.js";
26
+ import { RangeNotSatisfiableError } from "./http/416.js";
27
+ import { ExpectationFailedError } from "./http/417.js";
28
+ import { ImATeapotError } from "./http/418.js";
29
+ import { MisdirectedRequestError } from "./http/421.js";
30
+ import { UnprocessableEntityError } from "./http/422.js";
31
+ import { LockedError } from "./http/423.js";
32
+ import { FailedDependencyError } from "./http/424.js";
33
+ import { UnorderedCollectionError } from "./http/425.js";
34
+ import { UpgradeRequiredError } from "./http/426.js";
35
+ import { PreconditionRequiredError } from "./http/428.js";
36
+ import { TooManyRequestsError } from "./http/429.js";
37
+ import { RequestHeaderFieldsTooLargeError } from "./http/431.js";
38
+ import { UnavailableForLegalReasonsError } from "./http/451.js";
39
+ import { InternalServerError } from "./http/500.js";
40
+ import { NotImplementedError } from "./http/501.js";
41
+ import { BadGatewayError } from "./http/502.js";
42
+ import { ServiceUnavailableError } from "./http/503.js";
43
+ import { GatewayTimeoutError } from "./http/504.js";
44
+ import { HTTPVersionNotSupportedError } from "./http/505.js";
45
+ import { VariantAlsoNegotiatesError } from "./http/506.js";
46
+ import { InsufficientStorageError } from "./http/507.js";
47
+ import { LoopDetectedError } from "./http/508.js";
48
+ import { BandwidthLimitExceededError } from "./http/509.js";
49
+ import { NotExtendedError } from "./http/510.js";
50
+ import { NetworkAuthenticationRequiredError } from "./http/511.js";
51
+
52
+ export { BadGatewayError, BadRequestError, BandwidthLimitExceededError, ConflictError, BadRequestError as E400, UnauthorizedError as E401, PaymentRequiredError as E402, ForbiddenError as E403, NotFoundError as E404, MethodNotAllowedError as E405, NotAcceptableError as E406, ProxyAuthenticationRequiredError as E407, RequestTimeoutError as E408, ConflictError as E409, GoneError as E410, LengthRequiredError as E411, PreconditionFailedError as E412, PayloadTooLargeError as E413, URITooLongError as E414, UnsupportedMediaTypeError as E415, RangeNotSatisfiableError as E416, ExpectationFailedError as E417, ImATeapotError as E418, MisdirectedRequestError as E421, UnprocessableEntityError as E422, LockedError as E423, FailedDependencyError as E424, UnorderedCollectionError as E425, UpgradeRequiredError as E426, PreconditionRequiredError as E428, TooManyRequestsError as E429, RequestHeaderFieldsTooLargeError as E431, UnavailableForLegalReasonsError as E451, InternalServerError as E500, NotImplementedError as E501, BadGatewayError as E502, ServiceUnavailableError as E503, GatewayTimeoutError as E504, HTTPVersionNotSupportedError as E505, VariantAlsoNegotiatesError as E506, InsufficientStorageError as E507, LoopDetectedError as E508, BandwidthLimitExceededError as E509, NotExtendedError as E510, NetworkAuthenticationRequiredError as E511, EggBaseError, EggBaseException, EggError, EggException, ErrorOptions, ErrorType, ExpectationFailedError, FRAMEWORK_ERROR_SYMBOL, FailedDependencyError, ForbiddenError, FrameworkBaseError, FrameworkErrorFormater, GatewayTimeoutError, GoneError, HTTPVersionNotSupportedError, HttpError, ImATeapotError, InsufficientStorageError, InternalServerError, LengthRequiredError, LockedError, LoopDetectedError, MethodNotAllowedError, MisdirectedRequestError, NetworkAuthenticationRequiredError, NotAcceptableError, NotExtendedError, NotFoundError, NotImplementedError, PayloadTooLargeError, PaymentRequiredError, PreconditionFailedError, PreconditionRequiredError, ProxyAuthenticationRequiredError, RangeNotSatisfiableError, RequestHeaderFieldsTooLargeError, RequestTimeoutError, ServiceUnavailableError, TooManyRequestsError, URITooLongError, UnauthorizedError, UnavailableForLegalReasonsError, UnorderedCollectionError, UnprocessableEntityError, UnsupportedMediaTypeError, UpgradeRequiredError, VariantAlsoNegotiatesError };