Update auth_handler.go to return 422 error when upstream IdP not found

Co-authored-by: Ryan Richard <richardry@vmware.com>
This commit is contained in:
Benjamin A. Petersen
2023-09-11 11:09:50 -07:00
committed by Ryan Richard
co-authored by Ryan Richard
parent 6ef9cf273e
commit 770f8af62b
+1 -1
View File
@@ -63,7 +63,7 @@ func NewHandler(
oidcUpstream, ldapUpstream, err := chooseUpstreamIDP(idpNameQueryParamValue, idpFinder)
if err != nil {
plog.WarningErr("authorize upstream config", err)
return err
return httperr.Wrap(http.StatusUnprocessableEntity, err.Error(), err)
}
if oidcUpstream != nil {