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-06-15 17:02:07 -04:00 committed by Ryan Richard
parent 6ef9cf273e
commit 770f8af62b

View File

@ -63,7 +63,7 @@ func NewHandler(
oidcUpstream, ldapUpstream, err := chooseUpstreamIDP(idpNameQueryParamValue, idpFinder) oidcUpstream, ldapUpstream, err := chooseUpstreamIDP(idpNameQueryParamValue, idpFinder)
if err != nil { if err != nil {
plog.WarningErr("authorize upstream config", err) plog.WarningErr("authorize upstream config", err)
return err return httperr.Wrap(http.StatusUnprocessableEntity, err.Error(), err)
} }
if oidcUpstream != nil { if oidcUpstream != nil {