Fix badRequest error shape

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
This commit is contained in:
Convly 2020-05-15 09:34:49 +02:00 committed by Alexandre Bodin
parent 40089ed4aa
commit bc03d60b98

View File

@ -10,7 +10,7 @@ module.exports = {
try {
await validateUserCreationInput(body);
} catch (err) {
return ctx.badRequest(err);
return ctx.badRequest('ValidationError', err);
}
const attributes = _.pick(body, ['firstname', 'lastname', 'email', 'roles']);