Log schema name on error
This commit is contained in:
parent
70057ce1b6
commit
c6d763a905
@ -135,7 +135,7 @@ export function route(opts: RouteOptions) {
|
|||||||
);
|
);
|
||||||
if (process.env.LOG_VALIDATION_ERRORS)
|
if (process.env.LOG_VALIDATION_ERRORS)
|
||||||
console.log(
|
console.log(
|
||||||
`[VALIDATION ERROR] ${req.method} ${req.originalUrl} -`,
|
`[VALIDATION ERROR] ${req.method} ${req.originalUrl} - SCHEMA='${opts.requestBody}' -`,
|
||||||
validate?.errors,
|
validate?.errors,
|
||||||
);
|
);
|
||||||
throw FieldErrors(fields);
|
throw FieldErrors(fields);
|
||||||
|
|||||||
Reference in New Issue
Block a user