import { HttpException, HttpStatus } from '@nestjs/common'

export class ApplicationException extends HttpException {
  constructor(message: string, status: HttpStatus = HttpStatus.BAD_REQUEST) {
    super(message, status)
  }
}

export class ApplicationError extends ApplicationException {
  constructor(message: string) {
    super(message, HttpStatus.BAD_REQUEST)
  }
}

export class NotFoundError extends ApplicationException {
  constructor(message: string) {
    super(message, HttpStatus.NOT_FOUND)
  }
}

export class UnauthorizedError extends ApplicationException {
  constructor(message: string) {
    super(message, HttpStatus.UNAUTHORIZED)
  }
}

export class ForbiddenError extends ApplicationException {
  constructor(message: string) {
    super(message, HttpStatus.FORBIDDEN)
  }
}
