Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: interface conversion: interface {} is float64, not string #534

Open
Shinku-Chen opened this issue Nov 4, 2021 · 0 comments
Open

Comments

@Shinku-Chen
Copy link

Shinku-Chen commented Nov 4, 2021

  • 产品和接口:PAI-EAS
  • 平台:GO-LANG
  • 最小代码:

client :=eas.NewClientWithAccessKey(AkInfo.Region, AkInfo.AccessKeyID, AkInfo.AccessKeySecret) 
   client.SetEndpointRules(map[string]string{"cn-beijing": "pai-eas.cn-beijing.aliyuncs.com"}, paistudio.GetEndpointType(), "")
   request := eas.CreateModifyServiceRequest()
   request.Region = ResponseBody.Region
   request.ServiceName = ResponseBody.ServiceName
client.ModifyService(request); 

/Users/Shinku/go/go1.17.1/pkg/mod/github.com/aliyun/alibaba-cloud-sdk-go@v1.61.1319/sdk/errors/server_error.go

result.errorCode = errorCode.(string)会panic
因为此时errorCode为float64

panic: interface conversion: interface {} is float64, not string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants