Browse Source

fix: on ajv validation fail throw 400 bad request

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5239/head
Pranav C 2 years ago
parent
commit
fad9474b00
  1. 2
      packages/nocodb/src/lib/meta/helpers/catchError.ts

2
packages/nocodb/src/lib/meta/helpers/catchError.ts

@ -412,7 +412,7 @@ export default function (
} else if (e instanceof NotImplemented) { } else if (e instanceof NotImplemented) {
return res.status(501).json({ msg: e.message }); return res.status(501).json({ msg: e.message });
} else if (e instanceof AjvError) { } else if (e instanceof AjvError) {
return res.status(501).json({ msg: e.message, errors: e.errors }); return res.status(400).json({ msg: e.message, errors: e.errors });
} }
next(e); next(e);
} }

Loading…
Cancel
Save