mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-22 13:12:19 +00:00
Log validation errors
This commit is contained in:
1 parent
3bba7882fa
commit
d166c9a69a
1 file changed
+5
@@ -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