evolution-api/src/exceptions/403.exception.ts
2024-08-11 20:47:17 -03:00

12 lines
281 B
TypeScript

import { HttpStatus } from '@api/routes/index.router';
export class ForbiddenException {
constructor(...objectError: any[]) {
throw {
status: HttpStatus.FORBIDDEN,
error: 'Forbidden',
message: objectError.length > 0 ? objectError : undefined,
};
}
}