mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-14 11:50:31 +00:00
fix: auth pages errors handler
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
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,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user