mongoose-express-error-handler

1.0.6 • Public • Published

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);

Package Sidebar

Install

npm i mongoose-express-error-handler

Weekly Downloads

3

Version

1.0.6

License

GPL-3.0

Last publish

Collaborators

  • jmtvms