@tsed/exceptions 8.0.0-alpha.4 → 8.0.0-alpha.6

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 (156) hide show
  1. package/package.json +6 -7
  2. package/lib/cjs/clientErrors/BadMapping.js +0 -13
  3. package/lib/cjs/clientErrors/BadMapping.js.map +0 -1
  4. package/lib/cjs/clientErrors/BadRequest.js +0 -12
  5. package/lib/cjs/clientErrors/BadRequest.js.map +0 -1
  6. package/lib/cjs/clientErrors/Conflict.js +0 -12
  7. package/lib/cjs/clientErrors/Conflict.js.map +0 -1
  8. package/lib/cjs/clientErrors/ExpectationFailed.js +0 -12
  9. package/lib/cjs/clientErrors/ExpectationFailed.js.map +0 -1
  10. package/lib/cjs/clientErrors/Forbidden.js +0 -12
  11. package/lib/cjs/clientErrors/Forbidden.js.map +0 -1
  12. package/lib/cjs/clientErrors/Gone.js +0 -12
  13. package/lib/cjs/clientErrors/Gone.js.map +0 -1
  14. package/lib/cjs/clientErrors/ImATeapot.js +0 -13
  15. package/lib/cjs/clientErrors/ImATeapot.js.map +0 -1
  16. package/lib/cjs/clientErrors/LengthRequired.js +0 -12
  17. package/lib/cjs/clientErrors/LengthRequired.js.map +0 -1
  18. package/lib/cjs/clientErrors/MethodNotAllowed.js +0 -12
  19. package/lib/cjs/clientErrors/MethodNotAllowed.js.map +0 -1
  20. package/lib/cjs/clientErrors/MisdirectedRequest.js +0 -12
  21. package/lib/cjs/clientErrors/MisdirectedRequest.js.map +0 -1
  22. package/lib/cjs/clientErrors/NotAcceptable.js +0 -12
  23. package/lib/cjs/clientErrors/NotAcceptable.js.map +0 -1
  24. package/lib/cjs/clientErrors/NotFound.js +0 -12
  25. package/lib/cjs/clientErrors/NotFound.js.map +0 -1
  26. package/lib/cjs/clientErrors/PaymentRequired.js +0 -12
  27. package/lib/cjs/clientErrors/PaymentRequired.js.map +0 -1
  28. package/lib/cjs/clientErrors/PreconditionFailed.js +0 -12
  29. package/lib/cjs/clientErrors/PreconditionFailed.js.map +0 -1
  30. package/lib/cjs/clientErrors/PreconditionRequired.js +0 -12
  31. package/lib/cjs/clientErrors/PreconditionRequired.js.map +0 -1
  32. package/lib/cjs/clientErrors/ProxyAuthentificationRequired.js +0 -12
  33. package/lib/cjs/clientErrors/ProxyAuthentificationRequired.js.map +0 -1
  34. package/lib/cjs/clientErrors/RequestEntityTooLarge.js +0 -12
  35. package/lib/cjs/clientErrors/RequestEntityTooLarge.js.map +0 -1
  36. package/lib/cjs/clientErrors/RequestHeaderFieldsTooLarge.js +0 -12
  37. package/lib/cjs/clientErrors/RequestHeaderFieldsTooLarge.js.map +0 -1
  38. package/lib/cjs/clientErrors/RequestRangeUnsatisfiable.js +0 -12
  39. package/lib/cjs/clientErrors/RequestRangeUnsatisfiable.js.map +0 -1
  40. package/lib/cjs/clientErrors/RequestTimeout.js +0 -12
  41. package/lib/cjs/clientErrors/RequestTimeout.js.map +0 -1
  42. package/lib/cjs/clientErrors/RequestURITooLong.js +0 -12
  43. package/lib/cjs/clientErrors/RequestURITooLong.js.map +0 -1
  44. package/lib/cjs/clientErrors/TooManyRequests.js +0 -12
  45. package/lib/cjs/clientErrors/TooManyRequests.js.map +0 -1
  46. package/lib/cjs/clientErrors/Unauthorized.js +0 -12
  47. package/lib/cjs/clientErrors/Unauthorized.js.map +0 -1
  48. package/lib/cjs/clientErrors/UnavailableForLegalReasons.js +0 -12
  49. package/lib/cjs/clientErrors/UnavailableForLegalReasons.js.map +0 -1
  50. package/lib/cjs/clientErrors/UnprocessableEntity.js +0 -12
  51. package/lib/cjs/clientErrors/UnprocessableEntity.js.map +0 -1
  52. package/lib/cjs/clientErrors/UnsupportedMediaType.js +0 -12
  53. package/lib/cjs/clientErrors/UnsupportedMediaType.js.map +0 -1
  54. package/lib/cjs/clientErrors/UpgradeRequired.js +0 -12
  55. package/lib/cjs/clientErrors/UpgradeRequired.js.map +0 -1
  56. package/lib/cjs/core/ClientException.js +0 -12
  57. package/lib/cjs/core/ClientException.js.map +0 -1
  58. package/lib/cjs/core/Exception.js +0 -82
  59. package/lib/cjs/core/Exception.js.map +0 -1
  60. package/lib/cjs/core/RedirectException.js +0 -12
  61. package/lib/cjs/core/RedirectException.js.map +0 -1
  62. package/lib/cjs/core/ServerException.js +0 -12
  63. package/lib/cjs/core/ServerException.js.map +0 -1
  64. package/lib/cjs/core/StatusFamily.js +0 -10
  65. package/lib/cjs/core/StatusFamily.js.map +0 -1
  66. package/lib/cjs/index.js +0 -57
  67. package/lib/cjs/index.js.map +0 -1
  68. package/lib/cjs/package.json +0 -3
  69. package/lib/cjs/redirections/MovedPermanently.js +0 -12
  70. package/lib/cjs/redirections/MovedPermanently.js.map +0 -1
  71. package/lib/cjs/redirections/MovedTemporarily.js +0 -13
  72. package/lib/cjs/redirections/MovedTemporarily.js.map +0 -1
  73. package/lib/cjs/redirections/MultipleChoices.js +0 -12
  74. package/lib/cjs/redirections/MultipleChoices.js.map +0 -1
  75. package/lib/cjs/redirections/NotModified.js +0 -12
  76. package/lib/cjs/redirections/NotModified.js.map +0 -1
  77. package/lib/cjs/redirections/PermanentRedirect.js +0 -12
  78. package/lib/cjs/redirections/PermanentRedirect.js.map +0 -1
  79. package/lib/cjs/redirections/SeeOther.js +0 -12
  80. package/lib/cjs/redirections/SeeOther.js.map +0 -1
  81. package/lib/cjs/redirections/TemporaryRedirect.js +0 -12
  82. package/lib/cjs/redirections/TemporaryRedirect.js.map +0 -1
  83. package/lib/cjs/redirections/UseProxy.js +0 -12
  84. package/lib/cjs/redirections/UseProxy.js.map +0 -1
  85. package/lib/cjs/serverErrors/BadGateway.js +0 -12
  86. package/lib/cjs/serverErrors/BadGateway.js.map +0 -1
  87. package/lib/cjs/serverErrors/BandwidthLimitExceeded.js +0 -12
  88. package/lib/cjs/serverErrors/BandwidthLimitExceeded.js.map +0 -1
  89. package/lib/cjs/serverErrors/GatewayTimeout.js +0 -12
  90. package/lib/cjs/serverErrors/GatewayTimeout.js.map +0 -1
  91. package/lib/cjs/serverErrors/InternalServerError.js +0 -12
  92. package/lib/cjs/serverErrors/InternalServerError.js.map +0 -1
  93. package/lib/cjs/serverErrors/NetworkAuthenticationRequired.js +0 -12
  94. package/lib/cjs/serverErrors/NetworkAuthenticationRequired.js.map +0 -1
  95. package/lib/cjs/serverErrors/NotExtended.js +0 -12
  96. package/lib/cjs/serverErrors/NotExtended.js.map +0 -1
  97. package/lib/cjs/serverErrors/NotImplemented.js +0 -12
  98. package/lib/cjs/serverErrors/NotImplemented.js.map +0 -1
  99. package/lib/cjs/serverErrors/ProxyError.js +0 -13
  100. package/lib/cjs/serverErrors/ProxyError.js.map +0 -1
  101. package/lib/cjs/serverErrors/ServiceUnavailable.js +0 -12
  102. package/lib/cjs/serverErrors/ServiceUnavailable.js.map +0 -1
  103. package/lib/cjs/serverErrors/VariantAlsoNegotiates.js +0 -12
  104. package/lib/cjs/serverErrors/VariantAlsoNegotiates.js.map +0 -1
  105. package/lib/esm/package.json +0 -3
  106. package/lib/types-esm/clientErrors/BadMapping.d.ts +0 -6
  107. package/lib/types-esm/clientErrors/BadRequest.d.ts +0 -5
  108. package/lib/types-esm/clientErrors/Conflict.d.ts +0 -5
  109. package/lib/types-esm/clientErrors/ExpectationFailed.d.ts +0 -5
  110. package/lib/types-esm/clientErrors/Forbidden.d.ts +0 -5
  111. package/lib/types-esm/clientErrors/Gone.d.ts +0 -5
  112. package/lib/types-esm/clientErrors/ImATeapot.d.ts +0 -6
  113. package/lib/types-esm/clientErrors/LengthRequired.d.ts +0 -5
  114. package/lib/types-esm/clientErrors/MethodNotAllowed.d.ts +0 -5
  115. package/lib/types-esm/clientErrors/MisdirectedRequest.d.ts +0 -5
  116. package/lib/types-esm/clientErrors/NotAcceptable.d.ts +0 -5
  117. package/lib/types-esm/clientErrors/NotFound.d.ts +0 -5
  118. package/lib/types-esm/clientErrors/PaymentRequired.d.ts +0 -5
  119. package/lib/types-esm/clientErrors/PreconditionFailed.d.ts +0 -5
  120. package/lib/types-esm/clientErrors/PreconditionRequired.d.ts +0 -5
  121. package/lib/types-esm/clientErrors/ProxyAuthentificationRequired.d.ts +0 -5
  122. package/lib/types-esm/clientErrors/RequestEntityTooLarge.d.ts +0 -5
  123. package/lib/types-esm/clientErrors/RequestHeaderFieldsTooLarge.d.ts +0 -5
  124. package/lib/types-esm/clientErrors/RequestRangeUnsatisfiable.d.ts +0 -5
  125. package/lib/types-esm/clientErrors/RequestTimeout.d.ts +0 -5
  126. package/lib/types-esm/clientErrors/RequestURITooLong.d.ts +0 -5
  127. package/lib/types-esm/clientErrors/TooManyRequests.d.ts +0 -5
  128. package/lib/types-esm/clientErrors/Unauthorized.d.ts +0 -5
  129. package/lib/types-esm/clientErrors/UnavailableForLegalReasons.d.ts +0 -5
  130. package/lib/types-esm/clientErrors/UnprocessableEntity.d.ts +0 -5
  131. package/lib/types-esm/clientErrors/UnsupportedMediaType.d.ts +0 -5
  132. package/lib/types-esm/clientErrors/UpgradeRequired.d.ts +0 -5
  133. package/lib/types-esm/core/ClientException.d.ts +0 -4
  134. package/lib/types-esm/core/Exception.d.ts +0 -48
  135. package/lib/types-esm/core/RedirectException.d.ts +0 -4
  136. package/lib/types-esm/core/ServerException.d.ts +0 -4
  137. package/lib/types-esm/core/StatusFamily.d.ts +0 -5
  138. package/lib/types-esm/index.d.ts +0 -53
  139. package/lib/types-esm/redirections/MovedPermanently.d.ts +0 -5
  140. package/lib/types-esm/redirections/MovedTemporarily.d.ts +0 -6
  141. package/lib/types-esm/redirections/MultipleChoices.d.ts +0 -5
  142. package/lib/types-esm/redirections/NotModified.d.ts +0 -5
  143. package/lib/types-esm/redirections/PermanentRedirect.d.ts +0 -5
  144. package/lib/types-esm/redirections/SeeOther.d.ts +0 -5
  145. package/lib/types-esm/redirections/TemporaryRedirect.d.ts +0 -5
  146. package/lib/types-esm/redirections/UseProxy.d.ts +0 -5
  147. package/lib/types-esm/serverErrors/BadGateway.d.ts +0 -5
  148. package/lib/types-esm/serverErrors/BandwidthLimitExceeded.d.ts +0 -5
  149. package/lib/types-esm/serverErrors/GatewayTimeout.d.ts +0 -5
  150. package/lib/types-esm/serverErrors/InternalServerError.d.ts +0 -5
  151. package/lib/types-esm/serverErrors/NetworkAuthenticationRequired.d.ts +0 -5
  152. package/lib/types-esm/serverErrors/NotExtended.d.ts +0 -5
  153. package/lib/types-esm/serverErrors/NotImplemented.d.ts +0 -5
  154. package/lib/types-esm/serverErrors/ProxyError.d.ts +0 -6
  155. package/lib/types-esm/serverErrors/ServiceUnavailable.d.ts +0 -5
  156. package/lib/types-esm/serverErrors/VariantAlsoNegotiates.d.ts +0 -5
package/package.json CHANGED
@@ -1,17 +1,16 @@
1
1
  {
2
2
  "name": "@tsed/exceptions",
3
3
  "description": "HTTP exceptions module for Ts.ED Framework and other pure Express application",
4
- "type": "commonjs",
5
- "version": "8.0.0-alpha.4",
4
+ "type": "module",
5
+ "version": "8.0.0-alpha.6",
6
6
  "source": "./src/index.ts",
7
- "main": "./lib/cjs/index.js",
7
+ "main": "./lib/esm/index.js",
8
8
  "module": "./lib/esm/index.js",
9
9
  "typings": "./lib/types/index.d.ts",
10
10
  "exports": {
11
11
  ".": {
12
12
  "types": "./lib/types/index.d.ts",
13
13
  "import": "./lib/esm/index.js",
14
- "require": "./lib/cjs/index.js",
15
14
  "default": "./lib/cjs/index.js"
16
15
  }
17
16
  },
@@ -28,15 +27,15 @@
28
27
  "tslib": "2.6.1"
29
28
  },
30
29
  "devDependencies": {
31
- "@tsed/barrels": "8.0.0-alpha.4",
32
- "@tsed/typescript": "8.0.0-alpha.4",
30
+ "@tsed/barrels": "8.0.0-alpha.6",
31
+ "@tsed/typescript": "8.0.0-alpha.6",
33
32
  "@types/statuses": "2.0.5",
34
33
  "eslint": "^8.57.0",
35
34
  "typescript": "4.9.5",
36
35
  "vitest": "2.0.4"
37
36
  },
38
37
  "peerDependencies": {
39
- "@tsed/core": "8.0.0-alpha.4"
38
+ "@tsed/core": "8.0.0-alpha.6"
40
39
  },
41
40
  "repository": "https://github.com/tsedio/tsed",
42
41
  "bugs": {
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BadMapping = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class BadMapping extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 421; }
7
- constructor(message, origin) {
8
- super(BadMapping.STATUS, message, origin);
9
- this.name = "BAD_MAPPING";
10
- }
11
- }
12
- exports.BadMapping = BadMapping;
13
- //# sourceMappingURL=BadMapping.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BadMapping.js","sourceRoot":"","sources":["../../../src/clientErrors/BadMapping.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,UAAW,SAAQ,oCAAe;aAC7B,WAAM,GAAG,GAAG,CAAC;IAG7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAH5C,SAAI,GAAW,aAAa,CAAC;IAI7B,CAAC;;AANH,gCAOC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BadRequest = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class BadRequest extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 400; }
7
- constructor(message, origin) {
8
- super(BadRequest.STATUS, message, origin);
9
- }
10
- }
11
- exports.BadRequest = BadRequest;
12
- //# sourceMappingURL=BadRequest.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BadRequest.js","sourceRoot":"","sources":["../../../src/clientErrors/BadRequest.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,UAAW,SAAQ,oCAAe;aAC7B,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC5C,CAAC;;AALH,gCAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Conflict = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class Conflict extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 409; }
7
- constructor(message, origin) {
8
- super(Conflict.STATUS, message, origin);
9
- }
10
- }
11
- exports.Conflict = Conflict;
12
- //# sourceMappingURL=Conflict.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Conflict.js","sourceRoot":"","sources":["../../../src/clientErrors/Conflict.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,QAAS,SAAQ,oCAAe;aAC3B,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;;AALH,4BAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ExpectationFailed = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class ExpectationFailed extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 417; }
7
- constructor(message, origin) {
8
- super(ExpectationFailed.STATUS, message, origin);
9
- }
10
- }
11
- exports.ExpectationFailed = ExpectationFailed;
12
- //# sourceMappingURL=ExpectationFailed.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpectationFailed.js","sourceRoot":"","sources":["../../../src/clientErrors/ExpectationFailed.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,iBAAkB,SAAQ,oCAAe;aACpC,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACnD,CAAC;;AALH,8CAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Forbidden = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class Forbidden extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 403; }
7
- constructor(message, origin) {
8
- super(Forbidden.STATUS, message, origin);
9
- }
10
- }
11
- exports.Forbidden = Forbidden;
12
- //# sourceMappingURL=Forbidden.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Forbidden.js","sourceRoot":"","sources":["../../../src/clientErrors/Forbidden.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,SAAU,SAAQ,oCAAe;aAC5B,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;;AALH,8BAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Gone = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class Gone extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 410; }
7
- constructor(message, origin) {
8
- super(Gone.STATUS, message, origin);
9
- }
10
- }
11
- exports.Gone = Gone;
12
- //# sourceMappingURL=Gone.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Gone.js","sourceRoot":"","sources":["../../../src/clientErrors/Gone.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,IAAK,SAAQ,oCAAe;aACvB,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACtC,CAAC;;AALH,oBAMC"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ImATeapot = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class ImATeapot extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 418; }
7
- constructor(message, origin) {
8
- super(ImATeapot.STATUS, message, origin);
9
- this.name = "IM_A_TEAPOT";
10
- }
11
- }
12
- exports.ImATeapot = ImATeapot;
13
- //# sourceMappingURL=ImATeapot.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ImATeapot.js","sourceRoot":"","sources":["../../../src/clientErrors/ImATeapot.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,SAAU,SAAQ,oCAAe;aAC5B,WAAM,GAAG,GAAG,CAAC;IAG7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAH3C,SAAI,GAAW,aAAa,CAAC;IAI7B,CAAC;;AANH,8BAOC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LengthRequired = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class LengthRequired extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 411; }
7
- constructor(message, origin) {
8
- super(LengthRequired.STATUS, message, origin);
9
- }
10
- }
11
- exports.LengthRequired = LengthRequired;
12
- //# sourceMappingURL=LengthRequired.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LengthRequired.js","sourceRoot":"","sources":["../../../src/clientErrors/LengthRequired.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,cAAe,SAAQ,oCAAe;aACjC,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAChD,CAAC;;AALH,wCAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MethodNotAllowed = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class MethodNotAllowed extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 405; }
7
- constructor(message, origin) {
8
- super(MethodNotAllowed.STATUS, message, origin);
9
- }
10
- }
11
- exports.MethodNotAllowed = MethodNotAllowed;
12
- //# sourceMappingURL=MethodNotAllowed.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MethodNotAllowed.js","sourceRoot":"","sources":["../../../src/clientErrors/MethodNotAllowed.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,gBAAiB,SAAQ,oCAAe;aACnC,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAClD,CAAC;;AALH,4CAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MisdirectedRequest = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class MisdirectedRequest extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 421; }
7
- constructor(message, origin) {
8
- super(MisdirectedRequest.STATUS, message, origin);
9
- }
10
- }
11
- exports.MisdirectedRequest = MisdirectedRequest;
12
- //# sourceMappingURL=MisdirectedRequest.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MisdirectedRequest.js","sourceRoot":"","sources":["../../../src/clientErrors/MisdirectedRequest.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,kBAAmB,SAAQ,oCAAe;aACrC,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,kBAAkB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACpD,CAAC;;AALH,gDAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotAcceptable = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class NotAcceptable extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 406; }
7
- constructor(message, origin = "You must accept content-type " + message) {
8
- super(NotAcceptable.STATUS, origin);
9
- }
10
- }
11
- exports.NotAcceptable = NotAcceptable;
12
- //# sourceMappingURL=NotAcceptable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NotAcceptable.js","sourceRoot":"","sources":["../../../src/clientErrors/NotAcceptable.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,aAAc,SAAQ,oCAAe;aAChC,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,SAA+B,+BAA+B,GAAG,OAAO;QACnG,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,CAAC;;AALH,sCAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotFound = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class NotFound extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 404; }
7
- constructor(message, origin) {
8
- super(NotFound.STATUS, message, origin);
9
- }
10
- }
11
- exports.NotFound = NotFound;
12
- //# sourceMappingURL=NotFound.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NotFound.js","sourceRoot":"","sources":["../../../src/clientErrors/NotFound.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,QAAS,SAAQ,oCAAe;aAC3B,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;;AALH,4BAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PaymentRequired = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class PaymentRequired extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 402; }
7
- constructor(message, origin) {
8
- super(PaymentRequired.STATUS, message, origin);
9
- }
10
- }
11
- exports.PaymentRequired = PaymentRequired;
12
- //# sourceMappingURL=PaymentRequired.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PaymentRequired.js","sourceRoot":"","sources":["../../../src/clientErrors/PaymentRequired.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,eAAgB,SAAQ,oCAAe;aAClC,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;;AALH,0CAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PreconditionFailed = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class PreconditionFailed extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 412; }
7
- constructor(message, origin) {
8
- super(PreconditionFailed.STATUS, message, origin);
9
- }
10
- }
11
- exports.PreconditionFailed = PreconditionFailed;
12
- //# sourceMappingURL=PreconditionFailed.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PreconditionFailed.js","sourceRoot":"","sources":["../../../src/clientErrors/PreconditionFailed.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,kBAAmB,SAAQ,oCAAe;aACrC,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,kBAAkB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACpD,CAAC;;AALH,gDAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PreconditionRequired = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class PreconditionRequired extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 428; }
7
- constructor(message, origin) {
8
- super(PreconditionRequired.STATUS, message, origin);
9
- }
10
- }
11
- exports.PreconditionRequired = PreconditionRequired;
12
- //# sourceMappingURL=PreconditionRequired.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PreconditionRequired.js","sourceRoot":"","sources":["../../../src/clientErrors/PreconditionRequired.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,oBAAqB,SAAQ,oCAAe;aACvC,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC;;AALH,oDAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProxyAuthentificationRequired = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class ProxyAuthentificationRequired extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 407; }
7
- constructor(message, origin) {
8
- super(ProxyAuthentificationRequired.STATUS, message, origin);
9
- }
10
- }
11
- exports.ProxyAuthentificationRequired = ProxyAuthentificationRequired;
12
- //# sourceMappingURL=ProxyAuthentificationRequired.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProxyAuthentificationRequired.js","sourceRoot":"","sources":["../../../src/clientErrors/ProxyAuthentificationRequired.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,6BAA8B,SAAQ,oCAAe;aAChD,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,6BAA6B,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC/D,CAAC;;AALH,sEAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RequestEntityTooLarge = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class RequestEntityTooLarge extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 413; }
7
- constructor(message, origin) {
8
- super(RequestEntityTooLarge.STATUS, message, origin);
9
- }
10
- }
11
- exports.RequestEntityTooLarge = RequestEntityTooLarge;
12
- //# sourceMappingURL=RequestEntityTooLarge.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RequestEntityTooLarge.js","sourceRoot":"","sources":["../../../src/clientErrors/RequestEntityTooLarge.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,qBAAsB,SAAQ,oCAAe;aACxC,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,qBAAqB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACvD,CAAC;;AALH,sDAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RequestHeaderFieldsTooLarge = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class RequestHeaderFieldsTooLarge extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 431; }
7
- constructor(message, origin) {
8
- super(RequestHeaderFieldsTooLarge.STATUS, message, origin);
9
- }
10
- }
11
- exports.RequestHeaderFieldsTooLarge = RequestHeaderFieldsTooLarge;
12
- //# sourceMappingURL=RequestHeaderFieldsTooLarge.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RequestHeaderFieldsTooLarge.js","sourceRoot":"","sources":["../../../src/clientErrors/RequestHeaderFieldsTooLarge.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,2BAA4B,SAAQ,oCAAe;aAC9C,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC7D,CAAC;;AALH,kEAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RequestRangeUnsatisfiable = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class RequestRangeUnsatisfiable extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 416; }
7
- constructor(message, origin) {
8
- super(RequestRangeUnsatisfiable.STATUS, message, origin);
9
- }
10
- }
11
- exports.RequestRangeUnsatisfiable = RequestRangeUnsatisfiable;
12
- //# sourceMappingURL=RequestRangeUnsatisfiable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RequestRangeUnsatisfiable.js","sourceRoot":"","sources":["../../../src/clientErrors/RequestRangeUnsatisfiable.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,yBAA0B,SAAQ,oCAAe;aAC5C,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,yBAAyB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC3D,CAAC;;AALH,8DAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RequestTimeout = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class RequestTimeout extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 408; }
7
- constructor(message, origin) {
8
- super(RequestTimeout.STATUS, message, origin);
9
- }
10
- }
11
- exports.RequestTimeout = RequestTimeout;
12
- //# sourceMappingURL=RequestTimeout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RequestTimeout.js","sourceRoot":"","sources":["../../../src/clientErrors/RequestTimeout.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,cAAe,SAAQ,oCAAe;aACjC,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAChD,CAAC;;AALH,wCAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RequestURITooLong = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class RequestURITooLong extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 414; }
7
- constructor(message, origin) {
8
- super(RequestURITooLong.STATUS, message, origin);
9
- }
10
- }
11
- exports.RequestURITooLong = RequestURITooLong;
12
- //# sourceMappingURL=RequestURITooLong.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RequestURITooLong.js","sourceRoot":"","sources":["../../../src/clientErrors/RequestURITooLong.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,iBAAkB,SAAQ,oCAAe;aACpC,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACnD,CAAC;;AALH,8CAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TooManyRequests = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class TooManyRequests extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 429; }
7
- constructor(message, origin) {
8
- super(TooManyRequests.STATUS, message, origin);
9
- }
10
- }
11
- exports.TooManyRequests = TooManyRequests;
12
- //# sourceMappingURL=TooManyRequests.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TooManyRequests.js","sourceRoot":"","sources":["../../../src/clientErrors/TooManyRequests.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,eAAgB,SAAQ,oCAAe;aAClC,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;;AALH,0CAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Unauthorized = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class Unauthorized extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 401; }
7
- constructor(message, origin) {
8
- super(Unauthorized.STATUS, message, origin);
9
- }
10
- }
11
- exports.Unauthorized = Unauthorized;
12
- //# sourceMappingURL=Unauthorized.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Unauthorized.js","sourceRoot":"","sources":["../../../src/clientErrors/Unauthorized.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,YAAa,SAAQ,oCAAe;aAC/B,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;;AALH,oCAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UnavailableForLegalReasons = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class UnavailableForLegalReasons extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 451; }
7
- constructor(message, origin) {
8
- super(UnavailableForLegalReasons.STATUS, message, origin);
9
- }
10
- }
11
- exports.UnavailableForLegalReasons = UnavailableForLegalReasons;
12
- //# sourceMappingURL=UnavailableForLegalReasons.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UnavailableForLegalReasons.js","sourceRoot":"","sources":["../../../src/clientErrors/UnavailableForLegalReasons.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,0BAA2B,SAAQ,oCAAe;aAC7C,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,0BAA0B,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;;AALH,gEAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UnprocessableEntity = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class UnprocessableEntity extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 422; }
7
- constructor(message, origin) {
8
- super(UnprocessableEntity.STATUS, message, origin);
9
- }
10
- }
11
- exports.UnprocessableEntity = UnprocessableEntity;
12
- //# sourceMappingURL=UnprocessableEntity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UnprocessableEntity.js","sourceRoot":"","sources":["../../../src/clientErrors/UnprocessableEntity.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,mBAAoB,SAAQ,oCAAe;aACtC,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACrD,CAAC;;AALH,kDAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UnsupportedMediaType = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class UnsupportedMediaType extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 415; }
7
- constructor(message, origin) {
8
- super(UnsupportedMediaType.STATUS, message, origin);
9
- }
10
- }
11
- exports.UnsupportedMediaType = UnsupportedMediaType;
12
- //# sourceMappingURL=UnsupportedMediaType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UnsupportedMediaType.js","sourceRoot":"","sources":["../../../src/clientErrors/UnsupportedMediaType.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,oBAAqB,SAAQ,oCAAe;aACvC,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC;;AALH,oDAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpgradeRequired = void 0;
4
- const ClientException_js_1 = require("../core/ClientException.js");
5
- class UpgradeRequired extends ClientException_js_1.ClientException {
6
- static { this.STATUS = 426; }
7
- constructor(message, origin) {
8
- super(UpgradeRequired.STATUS, message, origin);
9
- }
10
- }
11
- exports.UpgradeRequired = UpgradeRequired;
12
- //# sourceMappingURL=UpgradeRequired.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UpgradeRequired.js","sourceRoot":"","sources":["../../../src/clientErrors/UpgradeRequired.ts"],"names":[],"mappings":";;;AAAA,mEAA2D;AAE3D,MAAa,eAAgB,SAAQ,oCAAe;aAClC,WAAM,GAAG,GAAG,CAAC;IAE7B,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;;AALH,0CAMC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ClientException = void 0;
4
- const Exception_js_1 = require("./Exception.js");
5
- const StatusFamily_js_1 = require("./StatusFamily.js");
6
- class ClientException extends Exception_js_1.Exception {
7
- constructor(status, message, origin) {
8
- super(Exception_js_1.Exception.validate(status, StatusFamily_js_1.StatusFamily["4xx"]), message, origin);
9
- }
10
- }
11
- exports.ClientException = ClientException;
12
- //# sourceMappingURL=ClientException.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ClientException.js","sourceRoot":"","sources":["../../../src/core/ClientException.ts"],"names":[],"mappings":";;;AAAA,iDAAyC;AACzC,uDAA+C;AAE/C,MAAa,eAAgB,SAAQ,wBAAS;IAC5C,YAAY,MAAc,EAAE,OAAe,EAAE,MAA6B;QACxE,KAAK,CAAC,wBAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,8BAAY,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1E,CAAC;CACF;AAJD,0CAIC"}
@@ -1,82 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HTTPException = exports.Exception = void 0;
4
- const tslib_1 = require("tslib");
5
- const core_1 = require("@tsed/core");
6
- const change_case_1 = require("change-case");
7
- const statuses_1 = tslib_1.__importDefault(require("statuses"));
8
- class Exception extends Error {
9
- static validate(status, family) {
10
- if (status < 100 || status >= 600) {
11
- throw new Error("Status must be between 100 and 599");
12
- }
13
- if (status.toString()[0] !== family.charAt(0)) {
14
- throw new Error(`Status ${status} does not belong to the family ${family}`);
15
- }
16
- return status;
17
- }
18
- constructor(status = 500, message = "", origin) {
19
- super(message);
20
- /**
21
- * Exception base name
22
- * @type {string}
23
- */
24
- this.name = "HTTP_EXCEPTION";
25
- /**
26
- * Exception type
27
- * @type {string}
28
- */
29
- this.type = "HTTP_EXCEPTION";
30
- /**
31
- * Headers must be sent to the response
32
- */
33
- this.headers = {};
34
- this.status = status;
35
- this.message = message;
36
- this.name = this.#getStatusConstant();
37
- this.setOrigin(origin);
38
- Error.captureStackTrace(this);
39
- }
40
- setHeaders(headers) {
41
- this.headers = {
42
- ...this.headers,
43
- ...headers
44
- };
45
- return this;
46
- }
47
- setHeader(key, value) {
48
- this.headers[key] = value;
49
- return this;
50
- }
51
- setOrigin(origin) {
52
- if (origin) {
53
- if (origin instanceof Error) {
54
- this.origin = origin;
55
- this.message = `${this.message}, innerException: ${this.origin.message}`.trim();
56
- }
57
- else if (typeof origin === "string") {
58
- this.origin = new Error(origin);
59
- this.message = `${this.message}, innerException: ${this.origin.message}`.trim();
60
- }
61
- else {
62
- this.body = origin;
63
- }
64
- }
65
- }
66
- toString() {
67
- return `${this.name}(${this.status}): ${this.message} `.trim();
68
- }
69
- #getStatusConstant() {
70
- try {
71
- return this.status === 200 ? "SUCCESS" : (0, change_case_1.constantCase)(String((0, statuses_1.default)(this.status)));
72
- }
73
- catch (er) {
74
- return (0, change_case_1.constantCase)((0, core_1.nameOf)((0, core_1.classOf)(this)));
75
- }
76
- }
77
- }
78
- exports.Exception = Exception;
79
- class HTTPException extends Exception {
80
- }
81
- exports.HTTPException = HTTPException;
82
- //# sourceMappingURL=Exception.js.map