mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-14 11:50:31 +00:00
14 lines
365 B
TypeScript
14 lines
365 B
TypeScript
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,
|
|
});
|
|
}
|
|
}
|