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:
+3
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user