@tsed/exceptions 6.79.0 → 6.81.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/lib/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from "./core";
2
- export * from "./constants/statuses";
3
2
  export * from "./clientErrors";
4
3
  export * from "./redirections";
5
4
  export * from "./serverErrors";
package/lib/index.js CHANGED
@@ -75,12 +75,6 @@ class Exception extends Error {
75
75
  }
76
76
  class HTTPException extends Exception {}
77
77
 
78
- /**
79
- *
80
- */
81
-
82
- const HTTP_STATUSES = schema.HTTP_STATUS_MESSAGES;
83
-
84
78
  class BadMapping extends Exception {
85
79
  constructor(message, origin) {
86
80
  super(BadMapping.STATUS, message, origin);
@@ -464,7 +458,6 @@ exports.Forbidden = Forbidden;
464
458
  exports.GatewayTimeout = GatewayTimeout;
465
459
  exports.Gone = Gone;
466
460
  exports.HTTPException = HTTPException;
467
- exports.HTTP_STATUSES = HTTP_STATUSES;
468
461
  exports.ImATeapot = ImATeapot;
469
462
  exports.InternalServerError = InternalServerError;
470
463
  exports.LengthRequired = LengthRequired;
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/core/Exception.ts","../src/constants/statuses.ts","../src/clientErrors/BadMapping.ts","../src/clientErrors/BadRequest.ts","../src/clientErrors/Conflict.ts","../src/clientErrors/ExpectationFailed.ts","../src/clientErrors/Forbidden.ts","../src/clientErrors/Gone.ts","../src/clientErrors/ImATeapot.ts","../src/clientErrors/LengthRequired.ts","../src/clientErrors/MethodNotAllowed.ts","../src/clientErrors/MisdirectedRequest.ts","../src/clientErrors/NotAcceptable.ts","../src/clientErrors/NotFound.ts","../src/clientErrors/PaymentRequired.ts","../src/clientErrors/PreconditionFailed.ts","../src/clientErrors/PreconditionRequired.ts","../src/clientErrors/ProxyAuthentificationRequired.ts","../src/clientErrors/RequestRangeUnsatisfiable.ts","../src/clientErrors/RequestEntityTooLarge.ts","../src/clientErrors/RequestHeaderFieldsTooLarge.ts","../src/clientErrors/RequestTimeout.ts","../src/clientErrors/RequestURITooLong.ts","../src/clientErrors/TooManyRequests.ts","../src/clientErrors/Unauthorized.ts","../src/clientErrors/UnsupportedMediaType.ts","../src/clientErrors/UpgradeRequired.ts","../src/clientErrors/UnavailableForLegalReasons.ts","../src/clientErrors/UnprocessableEntity.ts","../src/redirections/MovedPermanently.ts","../src/redirections/MovedTemporarily.ts","../src/redirections/MultipleChoices.ts","../src/redirections/NotModified.ts","../src/redirections/PermanentRedirect.ts","../src/redirections/SeeOther.ts","../src/redirections/TemporaryRedirect.ts","../src/redirections/TooManyRedirects.ts","../src/redirections/UseProxy.ts","../src/serverErrors/BadGateway.ts","../src/serverErrors/GatewayTimeout.ts","../src/serverErrors/InternalServerError.ts","../src/serverErrors/NotImplemented.ts","../src/serverErrors/ProxyError.ts","../src/serverErrors/ServiceUnvailable.ts","../src/serverErrors/NetworkAuthenticationRequired.ts","../src/serverErrors/NotExtended.ts","../src/serverErrors/VariantAlsoNegotiates.ts","../src/serverErrors/BandwidthLimitExceeded.ts"],"sourcesContent":["import {getStatusConstant} from \"@tsed/schema\";\n\nexport class Exception extends Error {\n /**\n * Exception base name\n * @type {string}\n */\n public name: string = \"HTTP_EXCEPTION\";\n /**\n * Message of the exception\n */\n public message: string;\n /**\n * Exception type\n * @type {string}\n */\n public type: string = \"HTTP_EXCEPTION\";\n /**\n * Stack calling\n */\n public stack: string;\n public origin: Error & any;\n /**\n * HTTP Code Status\n */\n public status: number;\n /**\n *\n */\n public body: any;\n /**\n * Headers must be sent to the response\n */\n public headers: {[key: string]: any} = {};\n\n [key: string]: any;\n\n constructor(status: number = 500, message: string = \"\", origin?: Error | string | any) {\n super(message);\n\n this.status = status;\n this.message = message;\n this.name = getStatusConstant(status);\n\n this.setOrigin(origin);\n }\n\n setHeaders(headers: {[key: string]: any}) {\n this.headers = {\n ...this.headers,\n ...headers\n };\n\n return this;\n }\n\n setHeader(key: string, value: any) {\n this.headers[key] = value;\n\n return this;\n }\n\n setOrigin(origin: Error | string | any) {\n if (origin) {\n if (origin instanceof Error) {\n this.origin = origin;\n this.message = `${this.message}, innerException: ${this.origin.message}`.trim();\n } else if (typeof origin === \"string\") {\n this.origin = new Error(origin);\n this.message = `${this.message}, innerException: ${this.origin.message}`.trim();\n } else {\n this.body = origin;\n }\n }\n }\n\n toString() {\n return `${this.name}(${this.status}): ${this.message} `.trim();\n }\n}\n\nexport class HTTPException extends Exception {}\n","import {HTTP_STATUS_MESSAGES} from \"@tsed/schema\";\n\n/**\n *\n */\nexport const HTTP_STATUSES: any = HTTP_STATUS_MESSAGES;\n","import {Exception} from \"../core/Exception\";\n\nexport class BadMapping extends Exception {\n static readonly STATUS = 421;\n name: string = \"BAD_MAPPING\";\n\n constructor(message: string, origin?: Error | string | any) {\n super(BadMapping.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class BadRequest extends Exception {\n static readonly STATUS = 400;\n\n constructor(message: string, origin?: Error | string | any) {\n super(BadRequest.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class Conflict extends Exception {\n static readonly STATUS = 409;\n\n constructor(message: string, origin?: Error | string | any) {\n super(Conflict.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ExpectationFailed extends Exception {\n static readonly STATUS = 417;\n\n constructor(message: string, origin?: Error | string | any) {\n super(ExpectationFailed.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class Forbidden extends Exception {\n static readonly STATUS = 403;\n\n constructor(message: string, origin?: Error | string | any) {\n super(Forbidden.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class Gone extends Exception {\n static readonly STATUS = 410;\n\n constructor(message: string, origin?: Error | string | any) {\n super(Gone.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ImATeapot extends Exception {\n static readonly STATUS = 418;\n name: string = \"IM_A_TEAPOT\";\n\n constructor(message: string, origin?: Error | string | any) {\n super(ImATeapot.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class LengthRequired extends Exception {\n static readonly STATUS = 411;\n\n constructor(message: string, origin?: Error | string | any) {\n super(LengthRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MethodNotAllowed extends Exception {\n static readonly STATUS = 405;\n\n constructor(message: string, origin?: Error | string | any) {\n super(MethodNotAllowed.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MisdirectedRequest extends Exception {\n static readonly STATUS = 421;\n\n constructor(message: string, origin?: Error | string | any) {\n super(MisdirectedRequest.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotAcceptable extends Exception {\n static readonly STATUS = 406;\n\n constructor(message: string, origin: Error | string | any = \"You must accept content-type \" + message) {\n super(NotAcceptable.STATUS, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotFound extends Exception {\n static readonly STATUS = 404;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NotFound.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class PaymentRequired extends Exception {\n static readonly STATUS = 402;\n\n constructor(message: string, origin?: Error | string | any) {\n super(PaymentRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class PreconditionFailed extends Exception {\n static readonly STATUS = 412;\n\n constructor(message: string, origin?: Error | string | any) {\n super(PreconditionFailed.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class PreconditionRequired extends Exception {\n static readonly STATUS = 428;\n\n constructor(message: string, origin?: Error | string | any) {\n super(PreconditionRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ProxyAuthentificationRequired extends Exception {\n static readonly STATUS = 407;\n\n constructor(message: string, origin?: Error | string | any) {\n super(ProxyAuthentificationRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestRangeUnsatisfiable extends Exception {\n static readonly STATUS = 416;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestRangeUnsatisfiable.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestEntityTooLarge extends Exception {\n static readonly STATUS = 413;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestEntityTooLarge.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestHeaderFieldsTooLarge extends Exception {\n static readonly STATUS = 431;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestHeaderFieldsTooLarge.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestTimeout extends Exception {\n static readonly STATUS = 408;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestTimeout.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestURITooLong extends Exception {\n static readonly STATUS = 414;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestURITooLong.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class TooManyRequests extends Exception {\n static readonly STATUS = 429;\n\n constructor(message: string, origin?: Error | string | any) {\n super(TooManyRequests.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class Unauthorized extends Exception {\n static readonly STATUS = 401;\n\n constructor(message: string, origin?: Error | string | any) {\n super(Unauthorized.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UnsupportedMediaType extends Exception {\n static readonly STATUS = 415;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UnsupportedMediaType.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UpgradeRequired extends Exception {\n static readonly STATUS = 426;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UpgradeRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UnavailableForLegalReasons extends Exception {\n static readonly STATUS = 451;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UnavailableForLegalReasons.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UnprocessableEntity extends Exception {\n static readonly STATUS = 422;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UnprocessableEntity.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MovedPermanently extends Exception {\n static readonly STATUS = 301;\n\n constructor(message: string, origin?: Error | string | any) {\n super(MovedPermanently.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MovedTemporarily extends Exception {\n static readonly STATUS = 302;\n name: string = \"MOVED_TEMPORARILY\";\n\n constructor(message: string, origin?: Error | string | any) {\n super(MovedTemporarily.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MultipleChoices extends Exception {\n static readonly STATUS = 300;\n\n constructor(message: string, origin?: Error | string | any) {\n super(MultipleChoices.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotModified extends Exception {\n static readonly STATUS = 304;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NotModified.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class PermanentRedirect extends Exception {\n static readonly STATUS = 308;\n\n constructor(message: string, origin?: Error | string | any) {\n super(PermanentRedirect.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class SeeOther extends Exception {\n static readonly STATUS = 303;\n\n constructor(message: string, origin?: Error | string | any) {\n super(SeeOther.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class TemporaryRedirect extends Exception {\n static readonly STATUS = 307;\n\n constructor(message: string, origin?: Error | string | any) {\n super(TemporaryRedirect.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class TooManyRedirects extends Exception {\n static readonly STATUS = 310;\n\n constructor(message: string, origin?: Error | string | any) {\n super(TooManyRedirects.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UseProxy extends Exception {\n static readonly STATUS = 305;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UseProxy.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class BadGateway extends Exception {\n static readonly STATUS = 502;\n\n constructor(message: string, origin?: Error | string | any) {\n super(BadGateway.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class GatewayTimeout extends Exception {\n static readonly STATUS = 504;\n\n constructor(message: string, origin?: Error | string | any) {\n super(GatewayTimeout.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class InternalServerError extends Exception {\n static readonly STATUS = 500;\n\n constructor(message: string, origin?: Error | string | any) {\n super(InternalServerError.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotImplemented extends Exception {\n static readonly STATUS = 501;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NotImplemented.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ProxyError extends Exception {\n static readonly STATUS = 502;\n name: string = \"PROXY_ERROR\";\n\n constructor(message: string, origin?: Error | string | any) {\n super(ProxyError.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ServiceUnvailable extends Exception {\n static readonly STATUS = 503;\n\n constructor(message: string, origin?: Error | string | any) {\n super(ServiceUnvailable.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NetworkAuthenticationRequired extends Exception {\n static readonly STATUS = 511;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NetworkAuthenticationRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotExtended extends Exception {\n static readonly STATUS = 510;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NotExtended.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class VariantAlsoNegotiates extends Exception {\n static readonly STATUS = 506;\n\n constructor(message: string, origin?: Error | string | any) {\n super(VariantAlsoNegotiates.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class BandwidthLimitExceeded extends Exception {\n static readonly STATUS = 509;\n\n constructor(message: string, origin?: Error | string | any) {\n super(BandwidthLimitExceeded.STATUS, message, origin);\n }\n}\n"],"names":["Exception","Error","constructor","status","message","origin","name","getStatusConstant","setOrigin","setHeaders","headers","setHeader","key","value","trim","body","toString","HTTPException","HTTP_STATUSES","HTTP_STATUS_MESSAGES","BadMapping","STATUS","BadRequest","Conflict","ExpectationFailed","Forbidden","Gone","ImATeapot","LengthRequired","MethodNotAllowed","MisdirectedRequest","NotAcceptable","NotFound","PaymentRequired","PreconditionFailed","PreconditionRequired","ProxyAuthentificationRequired","RequestRangeUnsatisfiable","RequestEntityTooLarge","RequestHeaderFieldsTooLarge","RequestTimeout","RequestURITooLong","TooManyRequests","Unauthorized","UnsupportedMediaType","UpgradeRequired","UnavailableForLegalReasons","UnprocessableEntity","MovedPermanently","MovedTemporarily","MultipleChoices","NotModified","PermanentRedirect","SeeOther","TemporaryRedirect","TooManyRedirects","UseProxy","BadGateway","GatewayTimeout","InternalServerError","NotImplemented","ProxyError","ServiceUnvailable","NetworkAuthenticationRequired","NotExtended","VariantAlsoNegotiates","BandwidthLimitExceeded"],"mappings":";;;;;;;;;;;;;;;;;;;;MAEaA,kBAAkBC;AAmC7BC,EAAAA,YAAYC,SAAiB,KAAKC,UAAkB,IAAIC;AACtD,UAAMD,OAAN;AAnCF;;;;;AAIO,aAAA,GAAe,gBAAf;AAKP;;;;;AAIO,aAAA,GAAe,gBAAf;AAcP;;;;AAGO,gBAAA,GAAgC,EAAhC;AAOL,SAAKD,MAAL,GAAcA,MAAd;AACA,SAAKC,OAAL,GAAeA,OAAf;AACA,SAA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,EAAAA,YAAYE,SAAiBC;AAC3B,UAAMyD,iBAAiB,CAACzC,MAAxB,EAAgCjB,OAAhC,EAAyCC,MAAzC;AACD;;;AAJeyD,wBAAA,GAAS,GAAT;;MCDLC,sCAAsC/D;AAGjDE,EAAAA,YAAYE,SAAiBC;AAC3B,UAAM0D,6BAA6B,CAAC1C,MAApC,EAA4CjB,OAA5C,EAAqDC,MAArD;AACD;;;AAJe0D,oCAAA,GAAS,GAAT;;MCDLC,oBAAoBhE;AAG/BE,EAAAA,YAAYE,SAAiBC;AAC3B,UAAM2D,WAAW,CAAC3C,MAAlB,EAA0BjB,OAA1B,EAAmCC,MAAnC;AACD;;;AAJe2D,kBAAA,GAAS,GAAT;;MCDLC,8BAA8BjE;AAGzCE,EAAAA,YAAYE,SAAiBC;AAC3B,UAAM4D,qBAAqB,CAAC5C,MAA5B,EAAoCjB,OAApC,EAA6CC,MAA7C;AACD;;;AAJe4D,4BAAA,GAAS,GAAT;;MCDLC,+BAA+BlE;AAG1CE,EAAAA,YAAYE,SAAiBC;AAC3B,UAAM6D,sBAAsB,CAAC7C,MAA7B,EAAqCjB,OAArC,EAA8CC,MAA9C;AACD;;;AAJe6D,6BAAA,GAAS,GAAT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/core/Exception.ts","../src/clientErrors/BadMapping.ts","../src/clientErrors/BadRequest.ts","../src/clientErrors/Conflict.ts","../src/clientErrors/ExpectationFailed.ts","../src/clientErrors/Forbidden.ts","../src/clientErrors/Gone.ts","../src/clientErrors/ImATeapot.ts","../src/clientErrors/LengthRequired.ts","../src/clientErrors/MethodNotAllowed.ts","../src/clientErrors/MisdirectedRequest.ts","../src/clientErrors/NotAcceptable.ts","../src/clientErrors/NotFound.ts","../src/clientErrors/PaymentRequired.ts","../src/clientErrors/PreconditionFailed.ts","../src/clientErrors/PreconditionRequired.ts","../src/clientErrors/ProxyAuthentificationRequired.ts","../src/clientErrors/RequestRangeUnsatisfiable.ts","../src/clientErrors/RequestEntityTooLarge.ts","../src/clientErrors/RequestHeaderFieldsTooLarge.ts","../src/clientErrors/RequestTimeout.ts","../src/clientErrors/RequestURITooLong.ts","../src/clientErrors/TooManyRequests.ts","../src/clientErrors/Unauthorized.ts","../src/clientErrors/UnsupportedMediaType.ts","../src/clientErrors/UpgradeRequired.ts","../src/clientErrors/UnavailableForLegalReasons.ts","../src/clientErrors/UnprocessableEntity.ts","../src/redirections/MovedPermanently.ts","../src/redirections/MovedTemporarily.ts","../src/redirections/MultipleChoices.ts","../src/redirections/NotModified.ts","../src/redirections/PermanentRedirect.ts","../src/redirections/SeeOther.ts","../src/redirections/TemporaryRedirect.ts","../src/redirections/TooManyRedirects.ts","../src/redirections/UseProxy.ts","../src/serverErrors/BadGateway.ts","../src/serverErrors/GatewayTimeout.ts","../src/serverErrors/InternalServerError.ts","../src/serverErrors/NotImplemented.ts","../src/serverErrors/ProxyError.ts","../src/serverErrors/ServiceUnvailable.ts","../src/serverErrors/NetworkAuthenticationRequired.ts","../src/serverErrors/NotExtended.ts","../src/serverErrors/VariantAlsoNegotiates.ts","../src/serverErrors/BandwidthLimitExceeded.ts"],"sourcesContent":["import {getStatusConstant} from \"@tsed/schema\";\n\nexport class Exception extends Error {\n /**\n * Exception base name\n * @type {string}\n */\n public name: string = \"HTTP_EXCEPTION\";\n /**\n * Message of the exception\n */\n public message: string;\n /**\n * Exception type\n * @type {string}\n */\n public type: string = \"HTTP_EXCEPTION\";\n /**\n * Stack calling\n */\n public stack: string;\n public origin: Error & any;\n /**\n * HTTP Code Status\n */\n public status: number;\n /**\n *\n */\n public body: any;\n /**\n * Headers must be sent to the response\n */\n public headers: {[key: string]: any} = {};\n\n [key: string]: any;\n\n constructor(status: number = 500, message: string = \"\", origin?: Error | string | any) {\n super(message);\n\n this.status = status;\n this.message = message;\n this.name = getStatusConstant(status);\n\n this.setOrigin(origin);\n }\n\n setHeaders(headers: {[key: string]: any}) {\n this.headers = {\n ...this.headers,\n ...headers\n };\n\n return this;\n }\n\n setHeader(key: string, value: any) {\n this.headers[key] = value;\n\n return this;\n }\n\n setOrigin(origin: Error | string | any) {\n if (origin) {\n if (origin instanceof Error) {\n this.origin = origin;\n this.message = `${this.message}, innerException: ${this.origin.message}`.trim();\n } else if (typeof origin === \"string\") {\n this.origin = new Error(origin);\n this.message = `${this.message}, innerException: ${this.origin.message}`.trim();\n } else {\n this.body = origin;\n }\n }\n }\n\n toString() {\n return `${this.name}(${this.status}): ${this.message} `.trim();\n }\n}\n\nexport class HTTPException extends Exception {}\n","import {Exception} from \"../core/Exception\";\n\nexport class BadMapping extends Exception {\n static readonly STATUS = 421;\n name: string = \"BAD_MAPPING\";\n\n constructor(message: string, origin?: Error | string | any) {\n super(BadMapping.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class BadRequest extends Exception {\n static readonly STATUS = 400;\n\n constructor(message: string, origin?: Error | string | any) {\n super(BadRequest.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class Conflict extends Exception {\n static readonly STATUS = 409;\n\n constructor(message: string, origin?: Error | string | any) {\n super(Conflict.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ExpectationFailed extends Exception {\n static readonly STATUS = 417;\n\n constructor(message: string, origin?: Error | string | any) {\n super(ExpectationFailed.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class Forbidden extends Exception {\n static readonly STATUS = 403;\n\n constructor(message: string, origin?: Error | string | any) {\n super(Forbidden.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class Gone extends Exception {\n static readonly STATUS = 410;\n\n constructor(message: string, origin?: Error | string | any) {\n super(Gone.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ImATeapot extends Exception {\n static readonly STATUS = 418;\n name: string = \"IM_A_TEAPOT\";\n\n constructor(message: string, origin?: Error | string | any) {\n super(ImATeapot.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class LengthRequired extends Exception {\n static readonly STATUS = 411;\n\n constructor(message: string, origin?: Error | string | any) {\n super(LengthRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MethodNotAllowed extends Exception {\n static readonly STATUS = 405;\n\n constructor(message: string, origin?: Error | string | any) {\n super(MethodNotAllowed.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MisdirectedRequest extends Exception {\n static readonly STATUS = 421;\n\n constructor(message: string, origin?: Error | string | any) {\n super(MisdirectedRequest.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotAcceptable extends Exception {\n static readonly STATUS = 406;\n\n constructor(message: string, origin: Error | string | any = \"You must accept content-type \" + message) {\n super(NotAcceptable.STATUS, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotFound extends Exception {\n static readonly STATUS = 404;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NotFound.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class PaymentRequired extends Exception {\n static readonly STATUS = 402;\n\n constructor(message: string, origin?: Error | string | any) {\n super(PaymentRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class PreconditionFailed extends Exception {\n static readonly STATUS = 412;\n\n constructor(message: string, origin?: Error | string | any) {\n super(PreconditionFailed.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class PreconditionRequired extends Exception {\n static readonly STATUS = 428;\n\n constructor(message: string, origin?: Error | string | any) {\n super(PreconditionRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ProxyAuthentificationRequired extends Exception {\n static readonly STATUS = 407;\n\n constructor(message: string, origin?: Error | string | any) {\n super(ProxyAuthentificationRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestRangeUnsatisfiable extends Exception {\n static readonly STATUS = 416;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestRangeUnsatisfiable.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestEntityTooLarge extends Exception {\n static readonly STATUS = 413;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestEntityTooLarge.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestHeaderFieldsTooLarge extends Exception {\n static readonly STATUS = 431;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestHeaderFieldsTooLarge.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestTimeout extends Exception {\n static readonly STATUS = 408;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestTimeout.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestURITooLong extends Exception {\n static readonly STATUS = 414;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestURITooLong.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class TooManyRequests extends Exception {\n static readonly STATUS = 429;\n\n constructor(message: string, origin?: Error | string | any) {\n super(TooManyRequests.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class Unauthorized extends Exception {\n static readonly STATUS = 401;\n\n constructor(message: string, origin?: Error | string | any) {\n super(Unauthorized.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UnsupportedMediaType extends Exception {\n static readonly STATUS = 415;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UnsupportedMediaType.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UpgradeRequired extends Exception {\n static readonly STATUS = 426;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UpgradeRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UnavailableForLegalReasons extends Exception {\n static readonly STATUS = 451;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UnavailableForLegalReasons.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UnprocessableEntity extends Exception {\n static readonly STATUS = 422;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UnprocessableEntity.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MovedPermanently extends Exception {\n static readonly STATUS = 301;\n\n constructor(message: string, origin?: Error | string | any) {\n super(MovedPermanently.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MovedTemporarily extends Exception {\n static readonly STATUS = 302;\n name: string = \"MOVED_TEMPORARILY\";\n\n constructor(message: string, origin?: Error | string | any) {\n super(MovedTemporarily.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MultipleChoices extends Exception {\n static readonly STATUS = 300;\n\n constructor(message: string, origin?: Error | string | any) {\n super(MultipleChoices.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotModified extends Exception {\n static readonly STATUS = 304;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NotModified.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class PermanentRedirect extends Exception {\n static readonly STATUS = 308;\n\n constructor(message: string, origin?: Error | string | any) {\n super(PermanentRedirect.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class SeeOther extends Exception {\n static readonly STATUS = 303;\n\n constructor(message: string, origin?: Error | string | any) {\n super(SeeOther.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class TemporaryRedirect extends Exception {\n static readonly STATUS = 307;\n\n constructor(message: string, origin?: Error | string | any) {\n super(TemporaryRedirect.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class TooManyRedirects extends Exception {\n static readonly STATUS = 310;\n\n constructor(message: string, origin?: Error | string | any) {\n super(TooManyRedirects.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UseProxy extends Exception {\n static readonly STATUS = 305;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UseProxy.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class BadGateway extends Exception {\n static readonly STATUS = 502;\n\n constructor(message: string, origin?: Error | string | any) {\n super(BadGateway.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class GatewayTimeout extends Exception {\n static readonly STATUS = 504;\n\n constructor(message: string, origin?: Error | string | any) {\n super(GatewayTimeout.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class InternalServerError extends Exception {\n static readonly STATUS = 500;\n\n constructor(message: string, origin?: Error | string | any) {\n super(InternalServerError.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotImplemented extends Exception {\n static readonly STATUS = 501;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NotImplemented.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ProxyError extends Exception {\n static readonly STATUS = 502;\n name: string = \"PROXY_ERROR\";\n\n constructor(message: string, origin?: Error | string | any) {\n super(ProxyError.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ServiceUnvailable extends Exception {\n static readonly STATUS = 503;\n\n constructor(message: string, origin?: Error | string | any) {\n super(ServiceUnvailable.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NetworkAuthenticationRequired extends Exception {\n static readonly STATUS = 511;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NetworkAuthenticationRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotExtended extends Exception {\n static readonly STATUS = 510;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NotExtended.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class VariantAlsoNegotiates extends Exception {\n static readonly STATUS = 506;\n\n constructor(message: string, origin?: Error | string | any) {\n super(VariantAlsoNegotiates.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class BandwidthLimitExceeded extends Exception {\n static readonly STATUS = 509;\n\n constructor(message: string, origin?: Error | string | any) {\n super(BandwidthLimitExceeded.STATUS, message, origin);\n }\n}\n"],"names":["Exception","Error","constructor","status","message","origin","name","getStatusConstant","setOrigin","setHeaders","headers","setHeader","key","value","trim","body","toString","HTTPException","BadMapping","STATUS","BadRequest","Conflict","ExpectationFailed","Forbidden","Gone","ImATeapot","LengthRequired","MethodNotAllowed","MisdirectedRequest","NotAcceptable","NotFound","PaymentRequired","PreconditionFailed","PreconditionRequired","ProxyAuthentificationRequired","RequestRangeUnsatisfiable","RequestEntityTooLarge","RequestHeaderFieldsTooLarge","RequestTimeout","RequestURITooLong","TooManyRequests","Unauthorized","UnsupportedMediaType","UpgradeRequired","UnavailableForLegalReasons","UnprocessableEntity","MovedPermanently","MovedTemporarily","MultipleChoices","NotModified","PermanentRedirect","SeeOther","TemporaryRedirect","TooManyRedirects","UseProxy","BadGateway","GatewayTimeout","InternalServerError","NotImplemented","ProxyError","ServiceUnvailable","NetworkAuthenticationRequired","NotExtended","VariantAlsoNegotiates","BandwidthLimitExceeded"],"mappings":";;;;;;;;;;;;;;;;;;;;MAEaA,kBAAkBC;AAmC7BC,EAAAA,YAAYC,SAAiB,KAAKC,UAAkB,IAAIC;AACtD,UAAMD,OAAN;AAnCF;;;;;AAIO,aAAA,GAAe,gBAAf;AAKP;;;;;AAIO,aAAA,GAAe,gBAAf;AAcP;;;;AAGO,gBAAA,GAAgC,EAAhC;AAOL,SAAKD,MAAL,GAAcA,MAAd;AACA,SAAKC,OAAL,GAAeA,OAAf;AACA,SAAKE,IAAL,GAAYC,wBAAiB,CAACJ,MAAD,CAA7B;AAEA,SAAKK,SAAL,CAAe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C,sCAAsC7D;AAGjDE,EAAAA,YAAYE,SAAiBC;AAC3B,UAAMwD,6BAA6B,CAAC1C,MAApC,EAA4Cf,OAA5C,EAAqDC,MAArD;AACD;;;AAJewD,oCAAA,GAAS,GAAT;;MCDLC,oBAAoB9D;AAG/BE,EAAAA,YAAYE,SAAiBC;AAC3B,UAAMyD,WAAW,CAAC3C,MAAlB,EAA0Bf,OAA1B,EAAmCC,MAAnC;AACD;;;AAJeyD,kBAAA,GAAS,GAAT;;MCDLC,8BAA8B/D;AAGzCE,EAAAA,YAAYE,SAAiBC;AAC3B,UAAM0D,qBAAqB,CAAC5C,MAA5B,EAAoCf,OAApC,EAA6CC,MAA7C;AACD;;;AAJe0D,4BAAA,GAAS,GAAT;;MCDLC,+BAA+BhE;AAG1CE,EAAAA,YAAYE,SAAiBC;AAC3B,UAAM2D,sBAAsB,CAAC7C,MAA7B,EAAqCf,OAArC,EAA8CC,MAA9C;AACD;;;AAJe2D,6BAAA,GAAS,GAAT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { getStatusConstant, HTTP_STATUS_MESSAGES } from '@tsed/schema';
1
+ import { getStatusConstant } from '@tsed/schema';
2
2
 
3
3
  function _extends() {
4
4
  _extends = Object.assign || function (target) {
@@ -75,12 +75,6 @@ class Exception extends Error {
75
75
  }
76
76
  class HTTPException extends Exception {}
77
77
 
78
- /**
79
- *
80
- */
81
-
82
- const HTTP_STATUSES = HTTP_STATUS_MESSAGES;
83
-
84
78
  class BadMapping extends Exception {
85
79
  constructor(message, origin) {
86
80
  super(BadMapping.STATUS, message, origin);
@@ -453,5 +447,5 @@ class BandwidthLimitExceeded extends Exception {
453
447
  }
454
448
  BandwidthLimitExceeded.STATUS = 509;
455
449
 
456
- export { BadGateway, BadMapping, BadRequest, BandwidthLimitExceeded, Conflict, Exception, ExpectationFailed, Forbidden, GatewayTimeout, Gone, HTTPException, HTTP_STATUSES, ImATeapot, InternalServerError, LengthRequired, MethodNotAllowed, MisdirectedRequest, MovedPermanently, MovedTemporarily, MultipleChoices, NetworkAuthenticationRequired, NotAcceptable, NotExtended, NotFound, NotImplemented, NotModified, PaymentRequired, PermanentRedirect, PreconditionFailed, PreconditionRequired, ProxyAuthentificationRequired, ProxyError, RequestEntityTooLarge, RequestHeaderFieldsTooLarge, RequestRangeUnsatisfiable, RequestTimeout, RequestURITooLong, SeeOther, ServiceUnvailable, TemporaryRedirect, TooManyRedirects, TooManyRequests, Unauthorized, UnavailableForLegalReasons, UnprocessableEntity, UnsupportedMediaType, UpgradeRequired, UseProxy, VariantAlsoNegotiates };
450
+ export { BadGateway, BadMapping, BadRequest, BandwidthLimitExceeded, Conflict, Exception, ExpectationFailed, Forbidden, GatewayTimeout, Gone, HTTPException, ImATeapot, InternalServerError, LengthRequired, MethodNotAllowed, MisdirectedRequest, MovedPermanently, MovedTemporarily, MultipleChoices, NetworkAuthenticationRequired, NotAcceptable, NotExtended, NotFound, NotImplemented, NotModified, PaymentRequired, PermanentRedirect, PreconditionFailed, PreconditionRequired, ProxyAuthentificationRequired, ProxyError, RequestEntityTooLarge, RequestHeaderFieldsTooLarge, RequestRangeUnsatisfiable, RequestTimeout, RequestURITooLong, SeeOther, ServiceUnvailable, TemporaryRedirect, TooManyRedirects, TooManyRequests, Unauthorized, UnavailableForLegalReasons, UnprocessableEntity, UnsupportedMediaType, UpgradeRequired, UseProxy, VariantAlsoNegotiates };
457
451
  //# sourceMappingURL=index.modern.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.modern.js","sources":["../src/core/Exception.ts","../src/constants/statuses.ts","../src/clientErrors/BadMapping.ts","../src/clientErrors/BadRequest.ts","../src/clientErrors/Conflict.ts","../src/clientErrors/ExpectationFailed.ts","../src/clientErrors/Forbidden.ts","../src/clientErrors/Gone.ts","../src/clientErrors/ImATeapot.ts","../src/clientErrors/LengthRequired.ts","../src/clientErrors/MethodNotAllowed.ts","../src/clientErrors/MisdirectedRequest.ts","../src/clientErrors/NotAcceptable.ts","../src/clientErrors/NotFound.ts","../src/clientErrors/PaymentRequired.ts","../src/clientErrors/PreconditionFailed.ts","../src/clientErrors/PreconditionRequired.ts","../src/clientErrors/ProxyAuthentificationRequired.ts","../src/clientErrors/RequestRangeUnsatisfiable.ts","../src/clientErrors/RequestEntityTooLarge.ts","../src/clientErrors/RequestHeaderFieldsTooLarge.ts","../src/clientErrors/RequestTimeout.ts","../src/clientErrors/RequestURITooLong.ts","../src/clientErrors/TooManyRequests.ts","../src/clientErrors/Unauthorized.ts","../src/clientErrors/UnsupportedMediaType.ts","../src/clientErrors/UpgradeRequired.ts","../src/clientErrors/UnavailableForLegalReasons.ts","../src/clientErrors/UnprocessableEntity.ts","../src/redirections/MovedPermanently.ts","../src/redirections/MovedTemporarily.ts","../src/redirections/MultipleChoices.ts","../src/redirections/NotModified.ts","../src/redirections/PermanentRedirect.ts","../src/redirections/SeeOther.ts","../src/redirections/TemporaryRedirect.ts","../src/redirections/TooManyRedirects.ts","../src/redirections/UseProxy.ts","../src/serverErrors/BadGateway.ts","../src/serverErrors/GatewayTimeout.ts","../src/serverErrors/InternalServerError.ts","../src/serverErrors/NotImplemented.ts","../src/serverErrors/ProxyError.ts","../src/serverErrors/ServiceUnvailable.ts","../src/serverErrors/NetworkAuthenticationRequired.ts","../src/serverErrors/NotExtended.ts","../src/serverErrors/VariantAlsoNegotiates.ts","../src/serverErrors/BandwidthLimitExceeded.ts"],"sourcesContent":["import {getStatusConstant} from \"@tsed/schema\";\n\nexport class Exception extends Error {\n /**\n * Exception base name\n * @type {string}\n */\n public name: string = \"HTTP_EXCEPTION\";\n /**\n * Message of the exception\n */\n public message: string;\n /**\n * Exception type\n * @type {string}\n */\n public type: string = \"HTTP_EXCEPTION\";\n /**\n * Stack calling\n */\n public stack: string;\n public origin: Error & any;\n /**\n * HTTP Code Status\n */\n public status: number;\n /**\n *\n */\n public body: any;\n /**\n * Headers must be sent to the response\n */\n public headers: {[key: string]: any} = {};\n\n [key: string]: any;\n\n constructor(status: number = 500, message: string = \"\", origin?: Error | string | any) {\n super(message);\n\n this.status = status;\n this.message = message;\n this.name = getStatusConstant(status);\n\n this.setOrigin(origin);\n }\n\n setHeaders(headers: {[key: string]: any}) {\n this.headers = {\n ...this.headers,\n ...headers\n };\n\n return this;\n }\n\n setHeader(key: string, value: any) {\n this.headers[key] = value;\n\n return this;\n }\n\n setOrigin(origin: Error | string | any) {\n if (origin) {\n if (origin instanceof Error) {\n this.origin = origin;\n this.message = `${this.message}, innerException: ${this.origin.message}`.trim();\n } else if (typeof origin === \"string\") {\n this.origin = new Error(origin);\n this.message = `${this.message}, innerException: ${this.origin.message}`.trim();\n } else {\n this.body = origin;\n }\n }\n }\n\n toString() {\n return `${this.name}(${this.status}): ${this.message} `.trim();\n }\n}\n\nexport class HTTPException extends Exception {}\n","import {HTTP_STATUS_MESSAGES} from \"@tsed/schema\";\n\n/**\n *\n */\nexport const HTTP_STATUSES: any = HTTP_STATUS_MESSAGES;\n","import {Exception} from \"../core/Exception\";\n\nexport class BadMapping extends Exception {\n static readonly STATUS = 421;\n name: string = \"BAD_MAPPING\";\n\n constructor(message: string, origin?: Error | string | any) {\n super(BadMapping.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class BadRequest extends Exception {\n static readonly STATUS = 400;\n\n constructor(message: string, origin?: Error | string | any) {\n super(BadRequest.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class Conflict extends Exception {\n static readonly STATUS = 409;\n\n constructor(message: string, origin?: Error | string | any) {\n super(Conflict.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ExpectationFailed extends Exception {\n static readonly STATUS = 417;\n\n constructor(message: string, origin?: Error | string | any) {\n super(ExpectationFailed.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class Forbidden extends Exception {\n static readonly STATUS = 403;\n\n constructor(message: string, origin?: Error | string | any) {\n super(Forbidden.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class Gone extends Exception {\n static readonly STATUS = 410;\n\n constructor(message: string, origin?: Error | string | any) {\n super(Gone.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ImATeapot extends Exception {\n static readonly STATUS = 418;\n name: string = \"IM_A_TEAPOT\";\n\n constructor(message: string, origin?: Error | string | any) {\n super(ImATeapot.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class LengthRequired extends Exception {\n static readonly STATUS = 411;\n\n constructor(message: string, origin?: Error | string | any) {\n super(LengthRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MethodNotAllowed extends Exception {\n static readonly STATUS = 405;\n\n constructor(message: string, origin?: Error | string | any) {\n super(MethodNotAllowed.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MisdirectedRequest extends Exception {\n static readonly STATUS = 421;\n\n constructor(message: string, origin?: Error | string | any) {\n super(MisdirectedRequest.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotAcceptable extends Exception {\n static readonly STATUS = 406;\n\n constructor(message: string, origin: Error | string | any = \"You must accept content-type \" + message) {\n super(NotAcceptable.STATUS, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotFound extends Exception {\n static readonly STATUS = 404;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NotFound.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class PaymentRequired extends Exception {\n static readonly STATUS = 402;\n\n constructor(message: string, origin?: Error | string | any) {\n super(PaymentRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class PreconditionFailed extends Exception {\n static readonly STATUS = 412;\n\n constructor(message: string, origin?: Error | string | any) {\n super(PreconditionFailed.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class PreconditionRequired extends Exception {\n static readonly STATUS = 428;\n\n constructor(message: string, origin?: Error | string | any) {\n super(PreconditionRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ProxyAuthentificationRequired extends Exception {\n static readonly STATUS = 407;\n\n constructor(message: string, origin?: Error | string | any) {\n super(ProxyAuthentificationRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestRangeUnsatisfiable extends Exception {\n static readonly STATUS = 416;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestRangeUnsatisfiable.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestEntityTooLarge extends Exception {\n static readonly STATUS = 413;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestEntityTooLarge.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestHeaderFieldsTooLarge extends Exception {\n static readonly STATUS = 431;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestHeaderFieldsTooLarge.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestTimeout extends Exception {\n static readonly STATUS = 408;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestTimeout.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestURITooLong extends Exception {\n static readonly STATUS = 414;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestURITooLong.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class TooManyRequests extends Exception {\n static readonly STATUS = 429;\n\n constructor(message: string, origin?: Error | string | any) {\n super(TooManyRequests.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class Unauthorized extends Exception {\n static readonly STATUS = 401;\n\n constructor(message: string, origin?: Error | string | any) {\n super(Unauthorized.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UnsupportedMediaType extends Exception {\n static readonly STATUS = 415;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UnsupportedMediaType.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UpgradeRequired extends Exception {\n static readonly STATUS = 426;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UpgradeRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UnavailableForLegalReasons extends Exception {\n static readonly STATUS = 451;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UnavailableForLegalReasons.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UnprocessableEntity extends Exception {\n static readonly STATUS = 422;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UnprocessableEntity.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MovedPermanently extends Exception {\n static readonly STATUS = 301;\n\n constructor(message: string, origin?: Error | string | any) {\n super(MovedPermanently.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MovedTemporarily extends Exception {\n static readonly STATUS = 302;\n name: string = \"MOVED_TEMPORARILY\";\n\n constructor(message: string, origin?: Error | string | any) {\n super(MovedTemporarily.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MultipleChoices extends Exception {\n static readonly STATUS = 300;\n\n constructor(message: string, origin?: Error | string | any) {\n super(MultipleChoices.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotModified extends Exception {\n static readonly STATUS = 304;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NotModified.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class PermanentRedirect extends Exception {\n static readonly STATUS = 308;\n\n constructor(message: string, origin?: Error | string | any) {\n super(PermanentRedirect.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class SeeOther extends Exception {\n static readonly STATUS = 303;\n\n constructor(message: string, origin?: Error | string | any) {\n super(SeeOther.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class TemporaryRedirect extends Exception {\n static readonly STATUS = 307;\n\n constructor(message: string, origin?: Error | string | any) {\n super(TemporaryRedirect.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class TooManyRedirects extends Exception {\n static readonly STATUS = 310;\n\n constructor(message: string, origin?: Error | string | any) {\n super(TooManyRedirects.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UseProxy extends Exception {\n static readonly STATUS = 305;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UseProxy.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class BadGateway extends Exception {\n static readonly STATUS = 502;\n\n constructor(message: string, origin?: Error | string | any) {\n super(BadGateway.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class GatewayTimeout extends Exception {\n static readonly STATUS = 504;\n\n constructor(message: string, origin?: Error | string | any) {\n super(GatewayTimeout.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class InternalServerError extends Exception {\n static readonly STATUS = 500;\n\n constructor(message: string, origin?: Error | string | any) {\n super(InternalServerError.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotImplemented extends Exception {\n static readonly STATUS = 501;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NotImplemented.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ProxyError extends Exception {\n static readonly STATUS = 502;\n name: string = \"PROXY_ERROR\";\n\n constructor(message: string, origin?: Error | string | any) {\n super(ProxyError.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ServiceUnvailable extends Exception {\n static readonly STATUS = 503;\n\n constructor(message: string, origin?: Error | string | any) {\n super(ServiceUnvailable.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NetworkAuthenticationRequired extends Exception {\n static readonly STATUS = 511;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NetworkAuthenticationRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotExtended extends Exception {\n static readonly STATUS = 510;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NotExtended.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class VariantAlsoNegotiates extends Exception {\n static readonly STATUS = 506;\n\n constructor(message: string, origin?: Error | string | any) {\n super(VariantAlsoNegotiates.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class BandwidthLimitExceeded extends Exception {\n static readonly STATUS = 509;\n\n constructor(message: string, origin?: Error | string | any) {\n super(BandwidthLimitExceeded.STATUS, message, origin);\n }\n}\n"],"names":["Exception","Error","constructor","status","message","origin","name","getStatusConstant","setOrigin","setHeaders","headers","setHeader","key","value","trim","body","toString","HTTPException","HTTP_STATUSES","HTTP_STATUS_MESSAGES","BadMapping","STATUS","BadRequest","Conflict","ExpectationFailed","Forbidden","Gone","ImATeapot","LengthRequired","MethodNotAllowed","MisdirectedRequest","NotAcceptable","NotFound","PaymentRequired","PreconditionFailed","PreconditionRequired","ProxyAuthentificationRequired","RequestRangeUnsatisfiable","RequestEntityTooLarge","RequestHeaderFieldsTooLarge","RequestTimeout","RequestURITooLong","TooManyRequests","Unauthorized","UnsupportedMediaType","UpgradeRequired","UnavailableForLegalReasons","UnprocessableEntity","MovedPermanently","MovedTemporarily","MultipleChoices","NotModified","PermanentRedirect","SeeOther","TemporaryRedirect","TooManyRedirects","UseProxy","BadGateway","GatewayTimeout","InternalServerError","NotImplemented","ProxyError","ServiceUnvailable","NetworkAuthenticationRequired","NotExtended","VariantAlsoNegotiates","BandwidthLimitExceeded"],"mappings":";;;;;;;;;;;;;;;;;;;;MAEaA,kBAAkBC;AAmC7BC,EAAAA,YAAYC,SAAiB,KAAK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AA,GAAS,GAAT;;MCDLC,mBAAmB7D;AAI9BE,EAAAA,YAAYE,SAAiBC;AAC3B,UAAMwD,UAAU,CAACxC,MAAjB,EAAyBjB,OAAzB,EAAkCC,MAAlC;AAHF,aAAA,GAAe,aAAf;AAIC;;;AALewD,iBAAA,GAAS,GAAT;;MCDLC,0BAA0B9D;AAGrCE,EAAAA,YAAYE,SAAiBC;AAC3B,UAAMyD,iBAAiB,CAACzC,MAAxB,EAAgCjB,OAAhC,EAAyCC,MAAzC;AACD;;;AAJeyD,wBAAA,GAAS,GAAT;;MCDLC,sCAAsC/D;AAGjDE,EAAAA,YAAYE,SAAiBC;AAC3B,UAAM0D,6BAA6B,CAAC1C,MAApC,EAA4CjB,OAA5C,EAAqDC,MAArD;AACD;;;AAJe0D,oCAAA,GAAS,GAAT;;MCDLC,oBAAoBhE;AAG/BE,EAAAA,YAAYE,SAAiBC;AAC3B,UAAM2D,WAAW,CAAC3C,MAAlB,EAA0BjB,OAA1B,EAAmCC,MAAnC;AACD;;;AAJe2D,kBAAA,GAAS,GAAT;;MCDLC,8BAA8BjE;AAGzCE,EAAAA,YAAYE,SAAiBC;AAC3B,UAAM4D,qBAAqB,CAAC5C,MAA5B,EAAoCjB,OAApC,EAA6CC,MAA7C;AACD;;;AAJe4D,4BAAA,GAAS,GAAT;;MCDLC,+BAA+BlE;AAG1CE,EAAAA,YAAYE,SAAiBC;AAC3B,UAAM6D,sBAAsB,CAAC7C,MAA7B,EAAqCjB,OAArC,EAA8CC,MAA9C;AACD;;;AAJe6D,6BAAA,GAAS,GAAT;;;;"}
1
+ {"version":3,"file":"index.modern.js","sources":["../src/core/Exception.ts","../src/clientErrors/BadMapping.ts","../src/clientErrors/BadRequest.ts","../src/clientErrors/Conflict.ts","../src/clientErrors/ExpectationFailed.ts","../src/clientErrors/Forbidden.ts","../src/clientErrors/Gone.ts","../src/clientErrors/ImATeapot.ts","../src/clientErrors/LengthRequired.ts","../src/clientErrors/MethodNotAllowed.ts","../src/clientErrors/MisdirectedRequest.ts","../src/clientErrors/NotAcceptable.ts","../src/clientErrors/NotFound.ts","../src/clientErrors/PaymentRequired.ts","../src/clientErrors/PreconditionFailed.ts","../src/clientErrors/PreconditionRequired.ts","../src/clientErrors/ProxyAuthentificationRequired.ts","../src/clientErrors/RequestRangeUnsatisfiable.ts","../src/clientErrors/RequestEntityTooLarge.ts","../src/clientErrors/RequestHeaderFieldsTooLarge.ts","../src/clientErrors/RequestTimeout.ts","../src/clientErrors/RequestURITooLong.ts","../src/clientErrors/TooManyRequests.ts","../src/clientErrors/Unauthorized.ts","../src/clientErrors/UnsupportedMediaType.ts","../src/clientErrors/UpgradeRequired.ts","../src/clientErrors/UnavailableForLegalReasons.ts","../src/clientErrors/UnprocessableEntity.ts","../src/redirections/MovedPermanently.ts","../src/redirections/MovedTemporarily.ts","../src/redirections/MultipleChoices.ts","../src/redirections/NotModified.ts","../src/redirections/PermanentRedirect.ts","../src/redirections/SeeOther.ts","../src/redirections/TemporaryRedirect.ts","../src/redirections/TooManyRedirects.ts","../src/redirections/UseProxy.ts","../src/serverErrors/BadGateway.ts","../src/serverErrors/GatewayTimeout.ts","../src/serverErrors/InternalServerError.ts","../src/serverErrors/NotImplemented.ts","../src/serverErrors/ProxyError.ts","../src/serverErrors/ServiceUnvailable.ts","../src/serverErrors/NetworkAuthenticationRequired.ts","../src/serverErrors/NotExtended.ts","../src/serverErrors/VariantAlsoNegotiates.ts","../src/serverErrors/BandwidthLimitExceeded.ts"],"sourcesContent":["import {getStatusConstant} from \"@tsed/schema\";\n\nexport class Exception extends Error {\n /**\n * Exception base name\n * @type {string}\n */\n public name: string = \"HTTP_EXCEPTION\";\n /**\n * Message of the exception\n */\n public message: string;\n /**\n * Exception type\n * @type {string}\n */\n public type: string = \"HTTP_EXCEPTION\";\n /**\n * Stack calling\n */\n public stack: string;\n public origin: Error & any;\n /**\n * HTTP Code Status\n */\n public status: number;\n /**\n *\n */\n public body: any;\n /**\n * Headers must be sent to the response\n */\n public headers: {[key: string]: any} = {};\n\n [key: string]: any;\n\n constructor(status: number = 500, message: string = \"\", origin?: Error | string | any) {\n super(message);\n\n this.status = status;\n this.message = message;\n this.name = getStatusConstant(status);\n\n this.setOrigin(origin);\n }\n\n setHeaders(headers: {[key: string]: any}) {\n this.headers = {\n ...this.headers,\n ...headers\n };\n\n return this;\n }\n\n setHeader(key: string, value: any) {\n this.headers[key] = value;\n\n return this;\n }\n\n setOrigin(origin: Error | string | any) {\n if (origin) {\n if (origin instanceof Error) {\n this.origin = origin;\n this.message = `${this.message}, innerException: ${this.origin.message}`.trim();\n } else if (typeof origin === \"string\") {\n this.origin = new Error(origin);\n this.message = `${this.message}, innerException: ${this.origin.message}`.trim();\n } else {\n this.body = origin;\n }\n }\n }\n\n toString() {\n return `${this.name}(${this.status}): ${this.message} `.trim();\n }\n}\n\nexport class HTTPException extends Exception {}\n","import {Exception} from \"../core/Exception\";\n\nexport class BadMapping extends Exception {\n static readonly STATUS = 421;\n name: string = \"BAD_MAPPING\";\n\n constructor(message: string, origin?: Error | string | any) {\n super(BadMapping.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class BadRequest extends Exception {\n static readonly STATUS = 400;\n\n constructor(message: string, origin?: Error | string | any) {\n super(BadRequest.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class Conflict extends Exception {\n static readonly STATUS = 409;\n\n constructor(message: string, origin?: Error | string | any) {\n super(Conflict.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ExpectationFailed extends Exception {\n static readonly STATUS = 417;\n\n constructor(message: string, origin?: Error | string | any) {\n super(ExpectationFailed.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class Forbidden extends Exception {\n static readonly STATUS = 403;\n\n constructor(message: string, origin?: Error | string | any) {\n super(Forbidden.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class Gone extends Exception {\n static readonly STATUS = 410;\n\n constructor(message: string, origin?: Error | string | any) {\n super(Gone.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ImATeapot extends Exception {\n static readonly STATUS = 418;\n name: string = \"IM_A_TEAPOT\";\n\n constructor(message: string, origin?: Error | string | any) {\n super(ImATeapot.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class LengthRequired extends Exception {\n static readonly STATUS = 411;\n\n constructor(message: string, origin?: Error | string | any) {\n super(LengthRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MethodNotAllowed extends Exception {\n static readonly STATUS = 405;\n\n constructor(message: string, origin?: Error | string | any) {\n super(MethodNotAllowed.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MisdirectedRequest extends Exception {\n static readonly STATUS = 421;\n\n constructor(message: string, origin?: Error | string | any) {\n super(MisdirectedRequest.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotAcceptable extends Exception {\n static readonly STATUS = 406;\n\n constructor(message: string, origin: Error | string | any = \"You must accept content-type \" + message) {\n super(NotAcceptable.STATUS, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotFound extends Exception {\n static readonly STATUS = 404;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NotFound.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class PaymentRequired extends Exception {\n static readonly STATUS = 402;\n\n constructor(message: string, origin?: Error | string | any) {\n super(PaymentRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class PreconditionFailed extends Exception {\n static readonly STATUS = 412;\n\n constructor(message: string, origin?: Error | string | any) {\n super(PreconditionFailed.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class PreconditionRequired extends Exception {\n static readonly STATUS = 428;\n\n constructor(message: string, origin?: Error | string | any) {\n super(PreconditionRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ProxyAuthentificationRequired extends Exception {\n static readonly STATUS = 407;\n\n constructor(message: string, origin?: Error | string | any) {\n super(ProxyAuthentificationRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestRangeUnsatisfiable extends Exception {\n static readonly STATUS = 416;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestRangeUnsatisfiable.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestEntityTooLarge extends Exception {\n static readonly STATUS = 413;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestEntityTooLarge.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestHeaderFieldsTooLarge extends Exception {\n static readonly STATUS = 431;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestHeaderFieldsTooLarge.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestTimeout extends Exception {\n static readonly STATUS = 408;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestTimeout.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class RequestURITooLong extends Exception {\n static readonly STATUS = 414;\n\n constructor(message: string, origin?: Error | string | any) {\n super(RequestURITooLong.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class TooManyRequests extends Exception {\n static readonly STATUS = 429;\n\n constructor(message: string, origin?: Error | string | any) {\n super(TooManyRequests.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class Unauthorized extends Exception {\n static readonly STATUS = 401;\n\n constructor(message: string, origin?: Error | string | any) {\n super(Unauthorized.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UnsupportedMediaType extends Exception {\n static readonly STATUS = 415;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UnsupportedMediaType.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UpgradeRequired extends Exception {\n static readonly STATUS = 426;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UpgradeRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UnavailableForLegalReasons extends Exception {\n static readonly STATUS = 451;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UnavailableForLegalReasons.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UnprocessableEntity extends Exception {\n static readonly STATUS = 422;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UnprocessableEntity.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MovedPermanently extends Exception {\n static readonly STATUS = 301;\n\n constructor(message: string, origin?: Error | string | any) {\n super(MovedPermanently.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MovedTemporarily extends Exception {\n static readonly STATUS = 302;\n name: string = \"MOVED_TEMPORARILY\";\n\n constructor(message: string, origin?: Error | string | any) {\n super(MovedTemporarily.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class MultipleChoices extends Exception {\n static readonly STATUS = 300;\n\n constructor(message: string, origin?: Error | string | any) {\n super(MultipleChoices.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotModified extends Exception {\n static readonly STATUS = 304;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NotModified.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class PermanentRedirect extends Exception {\n static readonly STATUS = 308;\n\n constructor(message: string, origin?: Error | string | any) {\n super(PermanentRedirect.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class SeeOther extends Exception {\n static readonly STATUS = 303;\n\n constructor(message: string, origin?: Error | string | any) {\n super(SeeOther.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class TemporaryRedirect extends Exception {\n static readonly STATUS = 307;\n\n constructor(message: string, origin?: Error | string | any) {\n super(TemporaryRedirect.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class TooManyRedirects extends Exception {\n static readonly STATUS = 310;\n\n constructor(message: string, origin?: Error | string | any) {\n super(TooManyRedirects.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class UseProxy extends Exception {\n static readonly STATUS = 305;\n\n constructor(message: string, origin?: Error | string | any) {\n super(UseProxy.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class BadGateway extends Exception {\n static readonly STATUS = 502;\n\n constructor(message: string, origin?: Error | string | any) {\n super(BadGateway.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class GatewayTimeout extends Exception {\n static readonly STATUS = 504;\n\n constructor(message: string, origin?: Error | string | any) {\n super(GatewayTimeout.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class InternalServerError extends Exception {\n static readonly STATUS = 500;\n\n constructor(message: string, origin?: Error | string | any) {\n super(InternalServerError.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotImplemented extends Exception {\n static readonly STATUS = 501;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NotImplemented.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ProxyError extends Exception {\n static readonly STATUS = 502;\n name: string = \"PROXY_ERROR\";\n\n constructor(message: string, origin?: Error | string | any) {\n super(ProxyError.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class ServiceUnvailable extends Exception {\n static readonly STATUS = 503;\n\n constructor(message: string, origin?: Error | string | any) {\n super(ServiceUnvailable.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NetworkAuthenticationRequired extends Exception {\n static readonly STATUS = 511;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NetworkAuthenticationRequired.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class NotExtended extends Exception {\n static readonly STATUS = 510;\n\n constructor(message: string, origin?: Error | string | any) {\n super(NotExtended.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class VariantAlsoNegotiates extends Exception {\n static readonly STATUS = 506;\n\n constructor(message: string, origin?: Error | string | any) {\n super(VariantAlsoNegotiates.STATUS, message, origin);\n }\n}\n","import {Exception} from \"../core/Exception\";\n\nexport class BandwidthLimitExceeded extends Exception {\n static readonly STATUS = 509;\n\n constructor(message: string, origin?: Error | string | any) {\n super(BandwidthLimitExceeded.STATUS, message, origin);\n }\n}\n"],"names":["Exception","Error","constructor","status","message","origin","name","getStatusConstant","setOrigin","setHeaders","headers","setHeader","key","value","trim","body","toString","HTTPException","BadMapping","STATUS","BadRequest","Conflict","ExpectationFailed","Forbidden","Gone","ImATeapot","LengthRequired","MethodNotAllowed","MisdirectedRequest","NotAcceptable","NotFound","PaymentRequired","PreconditionFailed","PreconditionRequired","ProxyAuthentificationRequired","RequestRangeUnsatisfiable","RequestEntityTooLarge","RequestHeaderFieldsTooLarge","RequestTimeout","RequestURITooLong","TooManyRequests","Unauthorized","UnsupportedMediaType","UpgradeRequired","UnavailableForLegalReasons","UnprocessableEntity","MovedPermanently","MovedTemporarily","MultipleChoices","NotModified","PermanentRedirect","SeeOther","TemporaryRedirect","TooManyRedirects","UseProxy","BadGateway","GatewayTimeout","InternalServerError","NotImplemented","ProxyError","ServiceUnvailable","NetworkAuthenticationRequired","NotExtended","VariantAlsoNegotiates","BandwidthLimitExceeded"],"mappings":";;;;;;;;;;;;;;;;;;;;MAEaA,kBAAkBC;AAmC7BC,EAAAA,YAAYC,SAAiB,KAAKC,UAAkB,IAAIC;AACtD,UAAMD,OAAN;AAnCF;;;;;AAIO,aAAA,GAAe,gBAAf;AAKP;;;;;AAIO,aAAA,GAAe,gBAAf;AAcP;;;;AAGO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AT;;MCDLC,0BAA0B5D;AAGrCE,EAAAA,YAAYE,SAAiBC;AAC3B,UAAMuD,iBAAiB,CAACzC,MAAxB,EAAgCf,OAAhC,EAAyCC,MAAzC;AACD;;;AAJeuD,wBAAA,GAAS,GAAT;;MCDLC,sCAAsC7D;AAGjDE,EAAAA,YAAYE,SAAiBC;AAC3B,UAAMwD,6BAA6B,CAAC1C,MAApC,EAA4Cf,OAA5C,EAAqDC,MAArD;AACD;;;AAJewD,oCAAA,GAAS,GAAT;;MCDLC,oBAAoB9D;AAG/BE,EAAAA,YAAYE,SAAiBC;AAC3B,UAAMyD,WAAW,CAAC3C,MAAlB,EAA0Bf,OAA1B,EAAmCC,MAAnC;AACD;;;AAJeyD,kBAAA,GAAS,GAAT;;MCDLC,8BAA8B/D;AAGzCE,EAAAA,YAAYE,SAAiBC;AAC3B,UAAM0D,qBAAqB,CAAC5C,MAA5B,EAAoCf,OAApC,EAA6CC,MAA7C;AACD;;;AAJe0D,4BAAA,GAAS,GAAT;;MCDLC,+BAA+BhE;AAG1CE,EAAAA,YAAYE,SAAiBC;AAC3B,UAAM2D,sBAAsB,CAAC7C,MAA7B,EAAqCf,OAArC,EAA8CC,MAA9C;AACD;;;AAJe2D,6BAAA,GAAS,GAAT;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/exceptions",
3
- "version": "6.79.0",
3
+ "version": "6.81.0",
4
4
  "description": "HTTP exceptions module for Ts.ED Framework and other pure Express application",
5
5
  "private": false,
6
6
  "source": "./src/index.ts",
@@ -14,7 +14,7 @@
14
14
  "build": "microbundle --target node --no-compress --format modern,cjs --tsconfig ./tsconfig.compile.json"
15
15
  },
16
16
  "dependencies": {
17
- "@tsed/schema": "6.79.0",
17
+ "@tsed/schema": "6.81.0",
18
18
  "tslib": "2.2.0"
19
19
  },
20
20
  "devDependencies": {},
@@ -1,4 +0,0 @@
1
- /**
2
- *
3
- */
4
- export declare const HTTP_STATUSES: any;