Throw 400 when validation fails
This commit is contained in:
parent
efc73caf44
commit
a809700ec2
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ exports.patch = async ctx => {
|
|||
})
|
||||
|
||||
if (!validateResult.valid) {
|
||||
throw { validation: validateResult.errors }
|
||||
ctx.throw(400, { validation: validateResult.errors })
|
||||
}
|
||||
|
||||
// returned row is cleaned and prepared for writing to DB
|
||||
|
|
Loading…
Reference in a new issue