Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/migueltvms/mongoose-express-error-handler
Mongoose Express error handler plugin.
https://github.com/migueltvms/mongoose-express-error-handler
express expressjs http-status-code module mongoose mongoosejs nodejs plugin validation
Last synced: about 2 months ago
JSON representation
Mongoose Express error handler plugin.
- Host: GitHub
- URL: https://github.com/migueltvms/mongoose-express-error-handler
- Owner: MiguelTVMS
- License: gpl-3.0
- Archived: true
- Created: 2017-05-19T23:40:39.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-22T18:24:33.000Z (over 7 years ago)
- Last Synced: 2024-09-27T20:43:09.743Z (about 2 months ago)
- Topics: express, expressjs, http-status-code, module, mongoose, mongoosejs, nodejs, plugin, validation
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/mongoose-express-error-handler
- Size: 19.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mongoose-express-error-handler
Mongoose Express error handler plugin.
This module convert the mongoose validation error in a bad request response and show all the validation errors without all the anoying stack trace.
## How to use it.
To use this module just add the reference to you javascript file.```javascript
const mongooseExpressErrorHandler = require('mongoose-express-error-handler');
```Then just add the plugin to your express app.
```javascript
const express = require('express');
const app = express();
app.use(mongooseExpressErrorHandler);
```