Closed Shengpei-Luke-Chen closed 6 years ago
我自己找到原因了,就是“此instance type不支持此类DiskType”
而各个instance type所支持的disk type,可以在 DescribeZoneInstanceConfigInfos
等里面找到。用户可以自行先检查是否支持,然后再query或者run
我的建议:
祝各位诸事顺利 :laughing:
这是CVM业务返回的错误消息,的确对开发者很不友好。
鉴于这个是cvm api的返回,sdk这边目前并不会去做特殊处理,只能靠底层去优化体验问题了。 专门的exception目前来看不会去做,因为错误码实在是太多了,如有对此特殊错误的处理需要,可以捕获通用异常,通过异常的code字段进行错误码判断哈。
我在query instance的价格,是个很简单的函数。用的基本都是默认值。
得到的错误信息如下。
Thanks ahead.