您可以参考本文档中提供的常见问题排查SDK使用中的问题。
错误码 | 错误信息 | 原因 | 解决方法 |
---|---|---|---|
SDK.CanNotResolveEndpoint |
Can not resolve endpoint, please check the user
guide |
SDK无法自动获取调用的产品在特定region的endpoint(域名)。 | 检查提供的地域ID和endpoint是否正确。获取endpoint后,可以通过以下代码设定endpoint:
|
SDK.JsonUnmarshalError |
Failed to unmarshal response |
SDK反序列化应答失败,大部分情况下是由于SDK实际收到的应答结构与ApiMeta不符(例如字段不匹配,格式不正确等原因)导致的。 | 您可以通过使用client.doAction(request) 方法,获取原始的HTTP应答。
|
SDK.TimeoutError |
The request timed out 4 times(3 for retry), perhaps we
should have the threshold raised a little? |
请求超时,并且所有重试均失败。 |
|
SDK.ServerError:InvalidProtocol.NeedSsl |
Your request is denied as lack of ssl
protect.Recommend:https://error-center.aliyun.com/status/search?Keyword=InvalidProtocol.NeedSsl&source=PopGw |
API只接受HTTPS请求,不接受HTTP请求。 | 在发送request前,添加以下代码:
|