From 08f3acdab601d1f3c04065c3fbe754a4978ab3ae Mon Sep 17 00:00:00 2001 From: Patrick Pimentel Date: Thu, 11 Dec 2025 12:25:39 -0500 Subject: [PATCH] docs(register): [PM-27084] Account Register Uses New Data Types - Made thrown error messages more appropriate --- src/Identity/Controllers/AccountsController.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Identity/Controllers/AccountsController.cs b/src/Identity/Controllers/AccountsController.cs index 805a98c543..a521816985 100644 --- a/src/Identity/Controllers/AccountsController.cs +++ b/src/Identity/Controllers/AccountsController.cs @@ -163,7 +163,7 @@ public class AccountsController : Controller { case RegisterFinishTokenType.EmailVerification: if (string.IsNullOrEmpty(model.EmailVerificationToken)) - throw new BadRequestException("Email verification token absent when processing an email token."); + throw new BadRequestException("Email verification token absent when processing register/finish."); identityResult = await _registerUserCommand.RegisterUserViaEmailVerificationToken( user, @@ -173,7 +173,7 @@ public class AccountsController : Controller case RegisterFinishTokenType.OrganizationInvite: if (string.IsNullOrEmpty(model.OrgInviteToken)) - throw new BadRequestException("Organization invite token absent when processing an email token."); + throw new BadRequestException("Organization invite token absent when processing register/finish."); identityResult = await _registerUserCommand.RegisterUserViaOrganizationInviteToken( user, @@ -184,7 +184,7 @@ public class AccountsController : Controller case RegisterFinishTokenType.OrgSponsoredFreeFamilyPlan: if (string.IsNullOrEmpty(model.OrgSponsoredFreeFamilyPlanToken)) - throw new BadRequestException("Organization sponsored free family plan token absent when processing an email token."); + throw new BadRequestException("Organization sponsored free family plan token absent when processing register/finish."); identityResult = await _registerUserCommand.RegisterUserViaOrganizationSponsoredFreeFamilyPlanInviteToken( user, @@ -194,10 +194,10 @@ public class AccountsController : Controller case RegisterFinishTokenType.EmergencyAccessInvite: if (string.IsNullOrEmpty(model.AcceptEmergencyAccessInviteToken)) - throw new BadRequestException("Accept emergency access invite token absent when processing an email token."); + throw new BadRequestException("Accept emergency access invite token absent when processing register/finish."); if (model.AcceptEmergencyAccessId == null || model.AcceptEmergencyAccessId == Guid.Empty) - throw new BadRequestException("Accept emergency access id absent when processing an email token."); + throw new BadRequestException("Accept emergency access id absent when processing register/finish."); identityResult = await _registerUserCommand.RegisterUserViaAcceptEmergencyAccessInviteToken( user, @@ -208,10 +208,10 @@ public class AccountsController : Controller case RegisterFinishTokenType.ProviderInvite: if (string.IsNullOrEmpty(model.ProviderInviteToken)) - throw new BadRequestException("Provider invite token absent when processing an email token."); + throw new BadRequestException("Provider invite token absent when processing register/finish."); if (model.ProviderUserId == null || model.ProviderUserId == Guid.Empty) - throw new BadRequestException("Provider user id absent when processing an email token."); + throw new BadRequestException("Provider user id absent when processing register/finish."); identityResult = await _registerUserCommand.RegisterUserViaProviderInviteToken( user,