diff --git a/src/Infrastructure/Identity/IdentityService.cs b/src/Infrastructure/Identity/IdentityService.cs index 6cf9a0f..6195a70 100644 --- a/src/Infrastructure/Identity/IdentityService.cs +++ b/src/Infrastructure/Identity/IdentityService.cs @@ -79,6 +79,11 @@ public class IdentityService( var response = await userManager.CreateAsync(applicationUser, password); + if (!response.Succeeded) + { + throw new BadHttpRequestException(response.Errors.First().Description); + } + var result = new Result(applicationUser.Id, response.Succeeded, response.ToApplicationResult().Errors); return result;