Log invalid uuids (#15099)

I had an issue with invalid UUIDs, and I think it would be easier to
find the offending one if the UUID were included in the error message.

This way a database dump can be easily searched.

---------

Co-authored-by: prastoin <paul@twenty.com>
This commit is contained in:
RaphiTobi
2025-10-17 14:33:33 +02:00
committed by GitHub
co-authored by prastoin
parent c554a6afbc
commit 9cd957844e
3 changed files with 6 additions and 3 deletions
@@ -9,7 +9,9 @@ const checkUUID = (value: any): string => {
throw new ValidationError('UUID must be a string');
}
if (!uuidValidate(value)) {
throw new ValidationError('Invalid UUID');
throw new ValidationError(`Invalid UUID`, {
value,
});
}
return value;