From 770f8af62bd55d9c926d55dca43cea02cf942dcd Mon Sep 17 00:00:00 2001 From: "Benjamin A. Petersen" Date: Thu, 15 Jun 2023 17:02:07 -0400 Subject: [PATCH] Update auth_handler.go to return 422 error when upstream IdP not found Co-authored-by: Ryan Richard --- internal/oidc/auth/auth_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/oidc/auth/auth_handler.go b/internal/oidc/auth/auth_handler.go index 7b94694f..10e486bb 100644 --- a/internal/oidc/auth/auth_handler.go +++ b/internal/oidc/auth/auth_handler.go @@ -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 {