import { HttpException } from '@nestjs/common';

export const STATUS_CODE = 431;
export const STATUS_MESSAGE = 'Request Header Fields Too Large';

export class RequestHeaderFieldsTooLargeException extends HttpException {
  constructor(message?: string) {
    super(
      {
        status: STATUS_CODE,
        message: message ?? STATUS_MESSAGE,
        error: message ? STATUS_MESSAGE : undefined,
      },
      STATUS_CODE,
    );
  }
}
