fix lint issues
This commit is contained in:
parent
459ba46c48
commit
87c59db02e
|
@ -32,7 +32,9 @@
|
||||||
// Prevent modal closing if there were errors
|
// Prevent modal closing if there were errors
|
||||||
return false
|
return false
|
||||||
} else if (rowResponse.status === 400 && rowResponse.validationErrors) {
|
} else if (rowResponse.status === 400 && rowResponse.validationErrors) {
|
||||||
errors = Object.keys(rowResponse.validationErrors).map(field => ({message: `${field} ${rowResponse.validationErrors[field][0]}`}))
|
errors = Object.keys(rowResponse.validationErrors).map(field => ({
|
||||||
|
message: `${field} ${rowResponse.validationErrors[field][0]}`,
|
||||||
|
}))
|
||||||
return false
|
return false
|
||||||
} else if (rowResponse.status === 500) {
|
} else if (rowResponse.status === 500) {
|
||||||
errors = [{ message: rowResponse.message }]
|
errors = [{ message: rowResponse.message }]
|
||||||
|
|
|
@ -58,7 +58,7 @@ router.use(async (ctx, next) => {
|
||||||
ctx.body = {
|
ctx.body = {
|
||||||
message: err.message,
|
message: err.message,
|
||||||
status: ctx.status,
|
status: ctx.status,
|
||||||
validationErrors: err.validation
|
validationErrors: err.validation,
|
||||||
}
|
}
|
||||||
if (env.NODE_ENV !== "jest") {
|
if (env.NODE_ENV !== "jest") {
|
||||||
ctx.log.error(err)
|
ctx.log.error(err)
|
||||||
|
|
Loading…
Reference in New Issue