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,12 +1,12 @@
import { CustomException } from 'src/utils/custom-exception';
import {
appendCommonExceptionCode,
CustomException,
} from 'src/utils/custom-exception';
export class DistantTableException extends CustomException {
constructor(message: string, code: DistantTableExceptionCode) {
super(message, code);
}
}
export class DistantTableException extends CustomException<
keyof typeof DistantTableExceptionCode
> {}
export enum DistantTableExceptionCode {
INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR',
TIMEOUT_ERROR = 'TIMEOUT_ERROR',
}
export const DistantTableExceptionCode = appendCommonExceptionCode({
TIMEOUT_ERROR: 'TIMEOUT_ERROR',
} as const);
@@ -1,10 +1,6 @@
import { CustomException } from 'src/utils/custom-exception';
export class ForeignTableException extends CustomException {
constructor(message: string, code: ForeignTableExceptionCode) {
super(message, code);
}
}
export class ForeignTableException extends CustomException<ForeignTableExceptionCode> {}
export enum ForeignTableExceptionCode {
FOREIGN_TABLE_MUTATION_NOT_ALLOWED = 'FOREIGN_TABLE_MUTATION_NOT_ALLOWED',
@@ -1,11 +1,6 @@
import { CustomException } from 'src/utils/custom-exception';
export class RemoteTableException extends CustomException {
declare code: RemoteTableExceptionCode;
constructor(message: string, code: RemoteTableExceptionCode) {
super(message, code);
}
}
export class RemoteTableException extends CustomException<RemoteTableExceptionCode> {}
export enum RemoteTableExceptionCode {
REMOTE_TABLE_NOT_FOUND = 'REMOTE_TABLE_NOT_FOUND',