Log validation errors

This commit is contained in:
Rory&
2025-09-29 18:33:17 +02:00
parent 50111cb6df
commit 05ec64471f
+5
View File
@@ -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);
}
}