🡠 Back to Index

error.js

A simple file to convert error’s products by express-validator into a human-readable format, where each new error is on a new line.

Key functions:

// Convert errors products by express-validator into a human-readable format,
// where each new error is on a new line.
exports.errorsToMessage = function errorsToMessage(errors)

// Create a 400 http error from a validation error produced by express-validator.
exports.createValidationError = function createValidationError(errors)

Vendors