Log validation errors
This commit is contained in:
parent
3bba7882fa
commit
d166c9a69a
@ -133,6 +133,11 @@ export function route(opts: RouteOptions) {
|
||||
message: x.message || "",
|
||||
}),
|
||||
);
|
||||
if (process.env.LOG_VALIDATION_ERRORS)
|
||||
console.log(
|
||||
`[VALIDATION ERROR] ${req.method} ${req.originalUrl} -`,
|
||||
validate?.errors,
|
||||
);
|
||||
throw FieldErrors(fields);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user