because I got bored of customising my CV for every job
at main 19 lines 490 B view raw
1import { DomainError } from "@cv/system"; 2 3export class EntityNotFoundError extends DomainError { 4 constructor(entityName: string, property: string, value: string) { 5 super( 6 "NOT_FOUND_ENTITY_NOT_FOUND", 7 `${entityName} with ${property} ${value} not found`, 8 { entityName, property, value }, 9 ); 10 } 11} 12 13export const notFound = ( 14 entityName: string, 15 property: string, 16 value: string, 17): never => { 18 throw new EntityNotFoundError(entityName, property, value); 19};