## Context In some CustomException exceptions, we were instantiating a code without initializing it which was overriding the parent code and it was then lost when retrieving it in filters. Removing them to make sure we don't reproduce this pattern
16 lines
524 B
TypeScript
16 lines
524 B
TypeScript
import { CustomException } from 'src/utils/custom-exception';
|
|
|
|
export class WorkspaceMigrationException extends CustomException {
|
|
constructor(message: string, code: WorkspaceMigrationExceptionCode) {
|
|
super(message, code);
|
|
}
|
|
}
|
|
|
|
export enum WorkspaceMigrationExceptionCode {
|
|
NO_FACTORY_FOUND = 'NO_FACTORY_FOUND',
|
|
INVALID_ACTION = 'INVALID_ACTION',
|
|
INVALID_FIELD_METADATA = 'INVALID_FIELD_METADATA',
|
|
INVALID_COMPOSITE_TYPE = 'INVALID_COMPOSITE_TYPE',
|
|
ENUM_TYPE_NAME_NOT_FOUND = 'ENUM_TYPE_NAME_NOT_FOUND',
|
|
}
|