Skip to content

Commit

Permalink
Show full validation error
Browse files Browse the repository at this point in the history
  • Loading branch information
maidul98 committed Jan 1, 2023
1 parent 776b4c2 commit f2bd4ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/middleware/validateRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const validate = (req: Request, res: Response, next: NextFunction) => {
try {
const errors = validationResult(req);
if (!errors.isEmpty()) {
return next(ValidationError({ context: { errors: `One or more of your paramters are invalid [error=${errors.array}]` } }))
return next(ValidationError({ context: { errors: `One or more of your parameters are invalid [error(s)=${(JSON.stringify(errors))}]` } }))
}

return next();
Expand Down

0 comments on commit f2bd4ae

Please sign in to comment.