Merge pull request #8169 from maximrub/fix/bug-8168-alibaba-cloud-endpoint-reloving
fix bug 8168 GetEndpoint resolving fail
This commit is contained in:
commit
c509bb2ef7
|
|
@ -89,9 +89,10 @@ func (resolver *LocationResolver) TryResolve(param *ResolveParam) (endpoint stri
|
|||
return
|
||||
}
|
||||
|
||||
err = json.Unmarshal([]byte(response.GetHttpContentString()), &getEndpointResponse)
|
||||
content := response.GetHttpContentString()
|
||||
err = json.Unmarshal([]byte(content), &getEndpointResponse)
|
||||
if err != nil {
|
||||
klog.Errorf("failed to unmarshal endpoint response, error: %v", err)
|
||||
klog.Errorf("failed to resolve endpoint, error: %v, response: %s", err, content)
|
||||
support = false
|
||||
return
|
||||
}
|
||||
|
|
@ -153,7 +154,7 @@ type EndpointsObj struct {
|
|||
|
||||
// EndpointObj wrapper endpoint
|
||||
type EndpointObj struct {
|
||||
Protocols map[string]string
|
||||
Protocols json.RawMessage
|
||||
Type string
|
||||
Namespace string
|
||||
Id string
|
||||
|
|
|
|||
Loading…
Reference in New Issue