From 3f15b46c5dbe6a01b79cbe26ccfa49bd19a53c30 Mon Sep 17 00:00:00 2001 From: Oleg Zhuk Date: Mon, 17 Jun 2024 11:59:31 +0200 Subject: [PATCH] VCST-1396: Improve error message (#78) fix: Improves error message Organization maintainer role not found. --- .../Commands/RegisterRequestCommandHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VirtoCommerce.ProfileExperienceApiModule.Data/Commands/RegisterRequestCommandHandler.cs b/src/VirtoCommerce.ProfileExperienceApiModule.Data/Commands/RegisterRequestCommandHandler.cs index 6c64dc64..08a2c0d0 100644 --- a/src/VirtoCommerce.ProfileExperienceApiModule.Data/Commands/RegisterRequestCommandHandler.cs +++ b/src/VirtoCommerce.ProfileExperienceApiModule.Data/Commands/RegisterRequestCommandHandler.cs @@ -320,7 +320,7 @@ protected virtual async Task GetMaintainerRole(RegisterOrganizationResult var role = await _accountService.FindRoleByName(maintainerRoleId) ?? await _accountService.FindRoleById(maintainerRoleId); if (role == null) { - SetErrorResult(result, "Role not found", $"Organization maintainer role {maintainerRoleId} not found", tokenSource); + SetErrorResult(result, "Role not found", $"The system could not find a role with the name '{maintainerRoleId}'. Create and configure a role with the name '{maintainerRoleId}'. Alternatively, change the role in the OrganizationMaintainerRole section to match an existing role.", tokenSource); } return role;