File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ func (g *DataGathererOIDC) fetchOIDCConfig(ctx context.Context) (map[string]any,
9494 return nil , fmt .Errorf ("failed to get /.well-known/openid-configuration: %s" , k8sErrorMessage (err ))
9595 }
9696
97- bytes , _ := result .Raw ()
97+ bytes , _ := result .Raw () // we already checked result.Error(), so there is no error here
9898 var oidcResponse map [string ]any
9999 if err := json .Unmarshal (bytes , & oidcResponse ); err != nil {
100100 return nil , fmt .Errorf ("failed to unmarshal OIDC discovery document: %v" , err )
@@ -115,7 +115,7 @@ func (g *DataGathererOIDC) fetchJWKS(ctx context.Context) (map[string]any, error
115115 return nil , fmt .Errorf ("failed to get /openid/v1/jwks: %s" , k8sErrorMessage (err ))
116116 }
117117
118- bytes , _ := result .Raw ()
118+ bytes , _ := result .Raw () // we already checked result.Error(), so there is no error here
119119 var jwksResponse map [string ]any
120120 if err := json .Unmarshal (bytes , & jwksResponse ); err != nil {
121121 return nil , fmt .Errorf ("failed to unmarshal JWKS response: %v" , err )
You can’t perform that action at this time.
0 commit comments