Class exception for each metadata module + handler to map on graphql error TODO left : - find a way to call handler on auto-resolvers nestjs query (probably interceptors) - discuss what should be done for pre-hooks errors - discuss what should be done for Unauthorized exception
15 lines
455 B
TypeScript
15 lines
455 B
TypeScript
import { CustomException } from 'src/utils/custom-exception';
|
|
|
|
export class WorkspaceMigrationException extends CustomException {
|
|
code: WorkspaceMigrationExceptionCode;
|
|
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',
|
|
}
|