UNPKG

gx-node-api-errors

Version:

Library to use in node js APIs to handle errors

63 lines (52 loc) 1.34 kB
<br /> <p align="center"> <a href="https://chain.inc"> <img src="https://gestioniximagessg.blob.core.windows.net/documentacion/scuer.png" alt="Logo" width="80" height="80"> </a> <h3 align="center">gx-node-api-errors</h3> <p align="center"> <br /> <a href="https://github.com/gestionix/REPO-NAME/issues">Report Bug</a> · <a href="https://github.com/gestionix/REPO-NAME/issues">Request Feature</a> </p> </p> ## Table of Contents * [About the Project](#about-the-project) * [Getting Started](#getting-started) * [Installation](#installation) * [Usage](#usage) * [Contributing](#contributing) * [Contact and authors](#contact-and-authors) ## About The Project Library to use in node js APIs to handle errors ``` { "message": "string", "microservice": "string", "errors": [ { "itemId": "string", "field": "string", "fieldValue": "string", "errorCode": 0, "errorType": "error", "errorMessage": "string" } ] } ``` ## Getting Started ### Installation Current stable realease ```sh $ npm install gx-node-api-errors ``` ### Usage To use this proyect you need to set the errors catalog on your app.js file ```js import { errorsCatalog } from 'gx-node-api-errors' ``` ```js errorsCatalog.set(catalog) ```