UNPKG

merest

Version:

Express based REST-full API for Mongoose models

306 lines (129 loc) 5.05 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Class: ModelAPIError | Merest</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/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Class: ModelAPIError</h1> <section> <header> <h2>ModelAPIError</h2> <div class="class-description">ModelAPIError - extends Error</div> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="ModelAPIError"><span class="type-signature"></span>new ModelAPIError<span class="signature">(code, message)</span><span class="type-signature"> &rarr; {<a href="ModelAPIError.html">ModelAPIError</a>}</span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>code</code></td> <td class="type"> <span class="param-type">Number</span> | <span class="param-type">String</span> </td> <td class="description last">the code should be transfered as HTTP-response code</td> </tr> <tr> <td class="name"><code>message</code></td> <td class="type"> <span class="param-type">String</span> | <span class="param-type">Error</span> </td> <td class="description last">the description of error</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="model-api-error.js.html">model-api-error.js</a>, <a href="model-api-error.js.html#line10">line 10</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> the ModelAPIError </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="ModelAPIError.html">ModelAPIError</a></span> </dd> </dl> </div> </article> </section> </div> <nav><h2> <a href="index.html">merest</a> </h2> <h3><a href="installation.html">Installation</a></h3> <ul> <li><a href="installation.html#prerequisites">Prerequisites</a></li> <li><a href="installation.html#npm-install">npm installation</a></li> <li><a href="installation.html#development">Development</a></li> </ul> <h3><a href="cook-book.html">Cook-book</a></h3> <h3><a href="conf-levels.html">API Configuration</a></h3> <ul> <li><a href="conf-levels.html">Configuration levels</a></li> <li><a href="conf-app.html">API Application</a></li> <li><a href="conf-router.html">Router</a></li> <li><a href="conf-end-points.html">End-point</a></li> <li><a href="conf-methods.html">Model methods</a></li> </ul> <h3><a href="end-points.html">API Requests and Responses</a></h3> <ul> <li><a href="end-points.html">Common reponses</a></li> <li><a href="end-points.html#ep_options">Options</a></li> <li><a href="end-points.html#ep_search">Search</a></li> <li><a href="end-points.html#ep_create">Create</a></li> <li><a href="end-points.html#ep_details">Details</a></li> <li><a href="end-points.html#ep_update">Update</a></li> <li><a href="end-points.html#ep_delete">Delete</a></li> <li><a href="end-points.html#transform-response">Custom response</a></li> </ul> <h3><a href="swagger.html">Swagger support</a></h3> <ul> <li><a href="swagger.html#install">Installation</a></li> <li><a href="swagger.html#api-conf">Configure API</a></li> <li><a href="swagger.html#document">Creating <code>swagger.json</code></a></li> <li><a href="swagger.html#api-docs">Exposing the api-docs</a></li> <li><a href="swagger.html#swagger-ui">Embedded swagger-ui</a></li> </ul> <h3>Specifications</h3> <ul> <li><a href="ModelAPIExpress.html">ModelAPIExpress</a></li> <li><a href="merest-swagger.html">Swagger-support methods</a></li> <li><a href="ModelAPIRouter.html">ModelAPIRouter</a></li> <li><a href="ModelAPIError.html">ModelAPIError</a></li> </ul> </nav> <br class="clear"> <footer> Documentation generated with <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>