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

export class OtSettingNotFoundException extends NotFoundException {
  constructor(error?: string) {
    super('OT setting not found', error);
  }
}

export class OtRecordNotFoundException extends NotFoundException {
  constructor(error?: string) {
    super('OT record not found', error);
  }
}

export class DuplicateOtRecordException extends BadRequestException {
  constructor(error?: string) {
    super('Duplicate OT record', error);
  }
}

export class OtRecordDateExceedTodayException extends BadRequestException {
  constructor(error?: string) {
    super('Record date > today', error);
  }
}