evolution-api/src/exceptions/401.exception.ts
2023-06-09 07:48:59 -03:00

12 lines
298 B
TypeScript

import { HttpStatus } from '../whatsapp/routers/index.router';
export class UnauthorizedException {
constructor(...objectError: any[]) {
throw {
status: HttpStatus.UNAUTHORIZED,
error: 'Unauthorized',
message: objectError.length > 0 ? objectError : undefined,
};
}
}