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

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,
});
}
}