mirror of
https://github.com/strapi/strapi.git
synced 2025-09-02 13:23:12 +00:00
Fix badRequest error shape
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
This commit is contained in:
parent
40089ed4aa
commit
bc03d60b98
@ -10,7 +10,7 @@ module.exports = {
|
|||||||
try {
|
try {
|
||||||
await validateUserCreationInput(body);
|
await validateUserCreationInput(body);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return ctx.badRequest(err);
|
return ctx.badRequest('ValidationError', err);
|
||||||
}
|
}
|
||||||
|
|
||||||
const attributes = _.pick(body, ['firstname', 'lastname', 'email', 'roles']);
|
const attributes = _.pick(body, ['firstname', 'lastname', 'email', 'roles']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user