mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 04:10:32 +00:00
fix: auth pages errors handler
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { UnauthorizedException } from '@nestjs/common';
|
||||
import { ERRORS } from '../Auth.constants';
|
||||
|
||||
export class UserNotFoundException extends UnauthorizedException {
|
||||
constructor(identifier: string) {
|
||||
super({
|
||||
statusCode: 401,
|
||||
error: 'Unauthorized',
|
||||
message: `User not found: ${identifier}`,
|
||||
code: ERRORS.USER_NOT_FOUND,
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user