evolution-api/src/exceptions/400.exception.ts
2023-07-27 08:36:18 -03:00

13 lines
347 B
TypeScript

import { HttpStatus } from '../whatsapp/routers/index.router';
export class BadRequestException {
constructor(...objectError: any[]) {
console.log('BadRequestException', objectError);
throw {
status: HttpStatus.BAD_REQUEST,
error: 'Bad Request',
message: objectError.length > 0 ? objectError : undefined,
};
}
}