1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-03 00:52:49 -05:00

Added throwing of Failure as the previous implementation would have.

This commit is contained in:
jrmccannon
2025-03-19 11:49:56 -05:00
parent 7f87922684
commit 0565755e4e

View File

@ -98,6 +98,16 @@ public class PostUserCommand(
var result = await inviteOrganizationUsersCommand.InviteScimOrganizationUserAsync(request);
if (result is Failure<ScimInviteOrganizationUsersResponse> failure)
{
if (failure.ErrorMessages.Count != 0)
{
throw new BadRequestException(failure.ErrorMessage);
}
return null;
}
if (result is not Success<ScimInviteOrganizationUsersResponse> successfulResponse)
{
return null;