Skip to content

Commit

Permalink
Always close window when role-provisioning
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldgray committed Jan 19, 2024
1 parent af59463 commit dea2a3b
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,15 @@ private async Task<IActionResult> RoleProvisionResponseConverter(IRequest<Handle
return View("CloseWindow");
}
// Below here are errors but rather than return a 500, return the closeWindow view. This will allow the
// viewer to continue (and fail) the auth flow.
if (provisionRoleResponse.IsError)
{
return StatusCode(provisionRoleResponse.ErrorStatus ?? 500, provisionRoleResponse.ErrorMessage);
return View("CloseWindow");
}
return StatusCode(500, "Unexpected error encountered");
Logger.LogWarning("RoleProvisionResponseConverter could not determine appropriate response");
return View("CloseWindow");
});
}
}

0 comments on commit dea2a3b

Please sign in to comment.