import { DomainError } from "@cv/system"; export class EntityNotFoundError extends DomainError { constructor(entityName: string, property: string, value: string) { super( "NOT_FOUND_ENTITY_NOT_FOUND", `${entityName} with ${property} ${value} not found`, { entityName, property, value }, ); } } export const notFound = ( entityName: string, property: string, value: string, ): never => { throw new EntityNotFoundError(entityName, property, value); };