1.0.4 • Published 4 years ago

mongoose-error-formatter v1.0.4

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

mongoose-error-formatter

Format common mongoose errors

Installation

npm install mongoose-error-formatter

Usage

const formatError = require("mongoose-error-formatter");

/**Parse mongoose error */
const formattedMessage = formatError(error)
console.log(formattedMessage)