6 lines
210 B
TypeScript
6 lines
210 B
TypeScript
// Respond with 400 and include error details from the joi validation
|
|
|
|
export default function res400 (error, res) {
|
|
res.status(400).json({status: 'Invalid body format', details: error.details[0].message});
|
|
}
|