import { BaseException , ErrorCodeType , MetadataType } from './BaseException' ; import { IError , ECodes } from './code.types' ; export const ALREADY_EXIST = { code : ECodes . ALREADY_EXIST , message : 'Resource already exists' , } ; export const EMAIL_ALREADY_EXISTS = { code : ECodes . EMAIL_ALREADY_EXISTS , message : 'Email already exists' , } ; export class AlreadyExistsException extends BaseException { constructor ( customCode ? , metadata = { } ) { super ( customCode || ALREADY_EXIST , metadata ) ; } }