Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

MiguelTVMS/mongoose-express-error-handler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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