feat(domain-manager): refactor custom domain validation and improve c… (#13388)

This commit is contained in:
Antoine Moreaux
2025-08-01 09:01:27 +02:00
committed by GitHub
parent 51340f2b0e
commit 23353e31e6
87 changed files with 779 additions and 901 deletions
@@ -1,14 +1,6 @@
import { CustomException } from 'src/utils/custom-exception';
export class InvalidMetadataException extends CustomException {
constructor(
message: string,
code: InvalidMetadataExceptionCode,
{ userFriendlyMessage }: { userFriendlyMessage?: string } = {},
) {
super(message, code, userFriendlyMessage);
}
}
export class InvalidMetadataException extends CustomException<InvalidMetadataExceptionCode> {}
export enum InvalidMetadataExceptionCode {
LABEL_REQUIRED = 'Label required',
@@ -16,7 +8,6 @@ export enum InvalidMetadataExceptionCode {
EXCEEDS_MAX_LENGTH = 'Exceeds max length',
RESERVED_KEYWORD = 'Reserved keyword',
NOT_CAMEL_CASE = 'Not camel case',
NOT_FIRST_LETTER_UPPER_CASE = 'Not first letter upper case',
INVALID_LABEL = 'Invalid label',
NAME_NOT_SYNCED_WITH_LABEL = 'Name not synced with label',
INVALID_STRING = 'Invalid string',