UNPKG

@magic.batua/error

Version:

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

146 lines (125 loc) 6.08 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Source/Code.js - Postman Documentation</title> <script src="scripts/prettify/prettify.js"></script> <script src="scripts/prettify/lang-css.js"></script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/ionicons.min.css"> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <input type="checkbox" id="nav-trigger" class="nav-trigger" /> <label for="nav-trigger" class="navicon-button x"> <div class="navicon"></div> </label> <label for="nav-trigger" class="overlay"></label> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ClientError.html">ClientError</a><ul class='methods'><li data-type='method'><a href="ClientError.html#Export">Export</a></li></ul></li><li><a href="ExternalError.html">ExternalError</a><ul class='methods'><li data-type='method'><a href="ExternalError.html#Export">Export</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-Code.html">Code</a></li><li><a href="module-Error.html">Error</a><ul class='methods'><li data-type='method'><a href="module-Error.html#~Handle">Handle</a></li></ul></li></ul> </nav> <div id="main"> <h1 class="page-title">Source/Code.js</h1> <section> <article> <pre class="prettyprint source linenums"><code>"use strict"; /** * @module Code * @overview Defines the `Code` enum that encapsulates HTTP status codes used throughout * the application. * * @author Animesh Mishra &lt;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</code></pre> </article> </section> </div> <br class="clear"> <footer> Documentation generated at Mon Mar 19 2018 23:41:29 GMT+0530 (IST) </footer> <script>prettyPrint();</script> <script src="scripts/linenumber.js"></script> </body> </html>