mirror of
https://github.com/bitwarden/server.git
synced 2025-04-05 13:08:17 -05:00
Added throwing of Failure as the previous implementation would have.
This commit is contained in:
parent
7f87922684
commit
0565755e4e
@ -98,6 +98,16 @@ public class PostUserCommand(
|
|||||||
|
|
||||||
var result = await inviteOrganizationUsersCommand.InviteScimOrganizationUserAsync(request);
|
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)
|
if (result is not Success<ScimInviteOrganizationUsersResponse> successfulResponse)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user