fix: a dynamic config will make a panic for addOrUpdateIDP (#18208)

This commit is contained in:
jiuker
2023-10-12 00:06:40 +08:00
committed by GitHub
parent 5512016885
commit f09756443d

View File

@@ -121,7 +121,7 @@ func addOrUpdateIDPHandler(ctx context.Context, w http.ResponseWriter, r *http.R
// IDP config is not dynamic. Sanity check.
if dynamic {
writeCustomErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrInternalError), err.Error(), r.URL)
writeCustomErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrInternalError), "", r.URL)
return
}