You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
428 B
15 lines
428 B
import { HttpException, HttpStatus } from '@nestjs/common';
|
|
import { createHttpExceptionBody } from '@nestjs/common/utils/http-exception-body.util';
|
|
|
|
export class ValidationException extends HttpException {
|
|
constructor(errors: string | object | any) {
|
|
super(
|
|
createHttpExceptionBody(
|
|
errors,
|
|
'VALIDATION_EXCEPTION',
|
|
HttpStatus.BAD_REQUEST,
|
|
),
|
|
HttpStatus.BAD_REQUEST,
|
|
);
|
|
}
|
|
}
|