penisularhr / src / exceptions / sector.ts
sector.ts
Raw
import { BadRequestException, NotFoundException } from '@nestjs/common';

export class SectorNotFoundException extends NotFoundException {
  constructor(error?: string) {
    super('Sector not found', error);
  }
}

export class DuplicateSectorException extends BadRequestException {
  constructor(error?: string) {
    super('Duplicate Sector', error);
  }
}

export class SectorIsInUsedException extends BadRequestException {
  constructor(error?: string) {
    super('Sector is in used', error);
  }
}