Files
bigcapital/packages/server/src/modules/Auth/exceptions/InvalidEmailPassword.exception.ts
2025-10-30 19:27:29 +02:00

16 lines
380 B
TypeScript

import { UnauthorizedException } from '@nestjs/common';
import { ERRORS } from '../Auth.constants';
export class InvalidEmailPasswordException extends UnauthorizedException {
constructor(email: string) {
super({
statusCode: 401,
error: 'Unauthorized',
message: `Invalid email or password for ${email}`,
code: ERRORS.INVALID_DETAILS,
});
}
}