Skip to content

Commit d0da789

Browse files
committed
fix: add code response
1 parent 5f3a1ec commit d0da789

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/middlewares/ExpressErrorYup.ts

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ async function ExpressErrorYup(
1111
if (err instanceof ValidationError) {
1212
console.log('ERROR YUP VALIDATION!!!')
1313
const error = {
14+
code: 422,
1415
message: err.errors.join('<br/>') || 'Yup Validation Error !',
1516
errors:
1617
err.inner.length > 0

0 commit comments

Comments
 (0)