1.0.6 • Published 7 years ago

mongoose-express-error-handler v1.0.6

Weekly downloads
4
License
GPL-3.0
Repository
github
Last release
7 years ago

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.

const mongooseExpressErrorHandler = require('mongoose-express-error-handler');

Then just add the plugin to your express app.

const express = require('express');
const app = express();
app.use(mongooseExpressErrorHandler);