UNPKG

@magic.batua/error

Version:

The Error module powers the error handling features of the Magic Batua.

87 lines 4.23 kB
"use strict"; /** * @module Code * @overview Defines the `Code` enum that encapsulates HTTP status codes used throughout * the application. * * @author Animesh Mishra <hello@animesh.ltd> * @copyright © 2018 Animesh Ltd. All Rights Reserved. */ Object.defineProperty(exports, "__esModule", { value: true }); /** * HTTP status codes used throughout the application to report exceptions to the * client. * @exports Code */ var Code; (function (Code) { // Informational Code[Code["Continue"] = 100] = "Continue"; Code[Code["SwitchingProtocols"] = 101] = "SwitchingProtocols"; Code[Code["Processing"] = 102] = "Processing"; // Success Code[Code["OK"] = 200] = "OK"; Code[Code["Created"] = 201] = "Created"; Code[Code["Accepted"] = 202] = "Accepted"; Code[Code["NonAuthInformation"] = 203] = "NonAuthInformation"; Code[Code["NoContent"] = 204] = "NoContent"; Code[Code["ResetContent"] = 205] = "ResetContent"; Code[Code["PartialContent"] = 206] = "PartialContent"; Code[Code["MultiStatus"] = 207] = "MultiStatus"; Code[Code["AlreadyReported"] = 208] = "AlreadyReported"; Code[Code["IMUsed"] = 226] = "IMUsed"; // Redirection Code[Code["MultipleChoices"] = 300] = "MultipleChoices"; Code[Code["MovedPermanently"] = 301] = "MovedPermanently"; Code[Code["Found"] = 302] = "Found"; Code[Code["SeeOther"] = 303] = "SeeOther"; Code[Code["NotModified"] = 304] = "NotModified"; Code[Code["UseProxy"] = 305] = "UseProxy"; Code[Code["TemporaryRedirect"] = 307] = "TemporaryRedirect"; Code[Code["PermanentRedirect"] = 308] = "PermanentRedirect"; // Client Error Code[Code["BadRequest"] = 400] = "BadRequest"; Code[Code["Unauthorised"] = 401] = "Unauthorised"; Code[Code["PaymentRequired"] = 402] = "PaymentRequired"; Code[Code["Forbidden"] = 403] = "Forbidden"; Code[Code["NotFound"] = 404] = "NotFound"; Code[Code["MethodNotAllowed"] = 405] = "MethodNotAllowed"; Code[Code["NotAcceptable"] = 406] = "NotAcceptable"; Code[Code["ProxyAuthRequired"] = 407] = "ProxyAuthRequired"; Code[Code["RequestTimeout"] = 408] = "RequestTimeout"; Code[Code["Conflict"] = 409] = "Conflict"; Code[Code["Gone"] = 410] = "Gone"; Code[Code["LengthRequired"] = 411] = "LengthRequired"; Code[Code["PreconditionFailed"] = 412] = "PreconditionFailed"; Code[Code["PayloadTooLarge"] = 413] = "PayloadTooLarge"; Code[Code["RequestURITooLong"] = 414] = "RequestURITooLong"; Code[Code["UnsupportedMedia"] = 415] = "UnsupportedMedia"; Code[Code["RangeNotSatisfiable"] = 416] = "RangeNotSatisfiable"; Code[Code["ExpectationFailed"] = 417] = "ExpectationFailed"; Code[Code["Teapot"] = 418] = "Teapot"; Code[Code["Misdirected"] = 421] = "Misdirected"; Code[Code["Unprocessable"] = 422] = "Unprocessable"; Code[Code["Locked"] = 423] = "Locked"; Code[Code["FailedDependency"] = 424] = "FailedDependency"; Code[Code["UpgradeRequired"] = 426] = "UpgradeRequired"; Code[Code["PreconditionRequired"] = 428] = "PreconditionRequired"; Code[Code["TooManyRequests"] = 429] = "TooManyRequests"; Code[Code["HeadersTooLarge"] = 431] = "HeadersTooLarge"; Code[Code["NoResponse"] = 444] = "NoResponse"; Code[Code["LegalLock"] = 451] = "LegalLock"; Code[Code["ClientClosedRequest"] = 499] = "ClientClosedRequest"; // Server Error Code[Code["Internal"] = 500] = "Internal"; Code[Code["NotImplemented"] = 501] = "NotImplemented"; Code[Code["BadGateway"] = 502] = "BadGateway"; Code[Code["ServiceUnavailable"] = 503] = "ServiceUnavailable"; Code[Code["GatewayTimeout"] = 504] = "GatewayTimeout"; Code[Code["UnsupportedVersion"] = 505] = "UnsupportedVersion"; Code[Code["VariantNegotiates"] = 506] = "VariantNegotiates"; Code[Code["InsufficientStorage"] = 507] = "InsufficientStorage"; Code[Code["LoopDetected"] = 508] = "LoopDetected"; Code[Code["NotExtended"] = 510] = "NotExtended"; Code[Code["NetworkAuthRequired"] = 511] = "NetworkAuthRequired"; Code[Code["ConnectTimeout"] = 599] = "ConnectTimeout"; })(Code = exports.Code || (exports.Code = {})); //# sourceMappingURL=Code.js.map