Some logging
This commit is contained in:
@@ -18,7 +18,13 @@ public class UserService(UserManager<ApplicationUser> userManager, SignInManager
|
||||
Email = email,
|
||||
};
|
||||
|
||||
await _userManager.CreateAsync(applicationUser, password);
|
||||
//todo: Need to handle errors better for the user.
|
||||
var response = await _userManager.CreateAsync(applicationUser, password);
|
||||
|
||||
if (response.Errors.Any())
|
||||
{
|
||||
throw new InvalidOperationException(response.Errors.First().Description);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user