## 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
15 lines
499 B
TypeScript
15 lines
499 B
TypeScript
import { CustomException } from 'src/utils/custom-exception';
|
|
|
|
export class RelationMetadataException extends CustomException {
|
|
constructor(message: string, code: RelationMetadataExceptionCode) {
|
|
super(message, code);
|
|
}
|
|
}
|
|
|
|
export enum RelationMetadataExceptionCode {
|
|
RELATION_METADATA_NOT_FOUND = 'RELATION_METADATA_NOT_FOUND',
|
|
INVALID_RELATION_INPUT = 'INVALID_RELATION_INPUT',
|
|
RELATION_ALREADY_EXISTS = 'RELATION_ALREADY_EXISTS',
|
|
FOREIGN_KEY_NOT_FOUND = 'FOREIGN_KEY_NOT_FOUND',
|
|
}
|