aliyun / api-gateway-nodejs-sdk

The API Gateway SDK for Node.js
MIT License
106 stars 23 forks source link

message maybe undefined: Cannot read property 'includes' of undefined; #15

Closed jazzhuang closed 6 years ago

jazzhuang commented 6 years ago

https://github.com/aliyun/api-gateway-nodejs-sdk/blob/229baad802ae417fe5231ff432b62ca9ab4d9862/lib/client.js#L182

一个case: code=400 但是此时 var message = response.headers['x-ca-error-message']; typeof message === "undefined"

jazzhuang commented 6 years ago

https://help.aliyun.com/document_detail/43800.html 根据这里的说明, 应该是返回X-Ca-Error-Message 这个header的, 但是我遇到的case居然没有这个, 同时code = 400

JacksonTian commented 6 years ago

现在应该没有这个问题了。