From 38052a190f455a4f1e792571959627e228f6b49d Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Tue, 28 Apr 2026 13:59:22 +0530 Subject: [PATCH] refactor: update auth error messages to use Professional terminology instead of Agent --- src/auth/auth.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/auth/auth.service.ts b/src/auth/auth.service.ts index 70767dc..9ff91e4 100644 --- a/src/auth/auth.service.ts +++ b/src/auth/auth.service.ts @@ -68,9 +68,9 @@ export class AuthService { }); if (existingUser) { - const existingRoleLabel = existingUser.role === UserRole.AGENT ? 'agent' : 'user'; + const existingRoleLabel = existingUser.role === UserRole.AGENT ? 'Professional' : 'User'; throw new ConflictException( - `Email address is already registered as an ${existingRoleLabel}. Kindly use a different email address for the new signup.`, + `Email address is already registered as a ${existingRoleLabel}. Kindly use a different email address for the new signup.`, ); } @@ -220,7 +220,7 @@ export class AuthService { if (dto.loginRole) { if (dto.loginRole === 'USER' && user.role === UserRole.AGENT) { throw new UnauthorizedException( - 'This email is registered as an Agent. Please use the Agent tab to sign in.', + 'This email is registered as a Professional. Please use the Professional tab to sign in.', ); } if (dto.loginRole === 'AGENT' && user.role === UserRole.USER) {