feat(domain-manager): refactor custom domain validation and improve c… (#13388)
This commit is contained in:
+1
-10
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user