{"version":3,"file":"base.errors-CzN9F5Pa.cjs","names":["msg: string","message: string"],"sources":["../src/domain/base.errors.ts"],"sourcesContent":["export class DomainError extends Error {\n  protected constructor(msg: string) {\n    super();\n\n    this.name = this.constructor.name;\n    this.message = msg;\n  }\n}\n\nexport class GenericDomainError extends DomainError {}\n\nexport class NotFoundError extends DomainError {}\n\nexport class AlreadyExistsError extends DomainError {}\n\nexport class UnauthorizedOperation extends DomainError {}\nexport class InvalidOperation extends DomainError {}\n\nexport class ValidationError extends DomainError {\n  // biome-ignore lint/complexity/noUselessConstructor: Need to make the constructor public\n  public constructor(message: string) {\n    super(message);\n  }\n}\n\nexport class GuardViolationError extends DomainError {}\n\nexport type DomainErr =\n  | AlreadyExistsError\n  | GenericDomainError\n  | InvalidOperation\n  | NotFoundError\n  | UnauthorizedOperation\n  | ValidationError\n  | GuardViolationError;\n"],"mappings":";;;AAAA,IAAa,cAAb,cAAiC,MAAM;CACrC,YAAsBA,KAAa;AACjC,SAAO;AAEP,OAAK,OAAO,KAAK,YAAY;AAC7B,OAAK,UAAU;CAChB;AACF;AAED,IAAa,qBAAb,cAAwC,YAAY,CAAE;AAEtD,IAAa,gBAAb,cAAmC,YAAY,CAAE;AAEjD,IAAa,qBAAb,cAAwC,YAAY,CAAE;AAEtD,IAAa,wBAAb,cAA2C,YAAY,CAAE;AACzD,IAAa,mBAAb,cAAsC,YAAY,CAAE;AAEpD,IAAa,kBAAb,cAAqC,YAAY;CAE/C,YAAmBC,SAAiB;AAClC,QAAM,QAAQ;CACf;AACF;AAED,IAAa,sBAAb,cAAyC,YAAY,CAAE"}