Fix userFriendlyMessage not showing for fieldMetadata (#13369)

This commit is contained in:
Marie
2025-07-23 11:33:40 +02:00
committed by GitHub
parent 924e599cba
commit bd9c54b85b
2 changed files with 6 additions and 0 deletions

View File

@ -136,6 +136,9 @@ export class FieldMetadataValidationService {
throw new FieldMetadataException(
error.message,
FieldMetadataExceptionCode.INVALID_FIELD_INPUT,
{
userFriendlyMessage: error.userFriendlyMessage,
},
);
}

View File

@ -59,6 +59,9 @@ export const validateFieldNameAvailabilityOrThrow = (
throw new InvalidMetadataException(
`Name "${name}" is not available`,
InvalidMetadataExceptionCode.RESERVED_KEYWORD,
{
userFriendlyMessage: t`This name is not available.`,
},
);
}
};