mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
fix: return proper error if OIDC Discoverydoc fails to respond (#17242)
This commit is contained in:
@@ -279,7 +279,7 @@ func parseDiscoveryDoc(u *xnet.URL, transport http.RoundTripper, closeRespFn fun
|
||||
}
|
||||
defer closeRespFn(resp.Body)
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return d, err
|
||||
return d, fmt.Errorf("unexpected error returned by %s : status(%s)", u, resp.Status)
|
||||
}
|
||||
dec := json.NewDecoder(resp.Body)
|
||||
if err = dec.Decode(&d); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user