import { DomainError } from "./app-error"; import { ConflictErrorCode } from "./error-codes"; export class EntityAlreadyExistsError extends DomainError { constructor(entityName: string, property: string, value: string) { super( ConflictErrorCode.ENTITY_ALREADY_EXISTS, `${entityName} with this ${property} already exists`, { entityName, property, value }, ); } }