godaddy / godaddy/node-openstack-wrapper
.createServerImage() errors with "Invalid format (output) missing from remote call"
- 主要語言
- JavaScript
- 星號
- 34
- 分支
- 33
- PR 合併指標
- 30 天內沒有已合併 PR
描述
When issuing a `.createServerImage()` command, the response returns the following error in the callback:
```
{ Error: Invalid format (output) missing from remote call
at _getRequestError (/home/test/node_modules/openstack-wrapper/lib/os-request.js:219:20)
at Request._callback (/home/test/node_modules/openstack-wrapper/lib/os-request.js:316:15)
at Request.self.callback (/home/test/node_modules/request/request.js:186:22)
at Request.emit (events.js:182:13)
at Request. (/home/test/node_modules/request/request.js:1163:10)
at Request.emit (events.js:182:13)
at IncomingMessage. (/home/test/node_modules/request/request.js:1085:12)
at Object.onceWrapper (events.js:273:13)
at IncomingMessage.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1086:12)
code: 'REMOTEERROR',
detail:
{ remoteMethod: 'POST',
remoteURI: '~~~remoteURI~~~',
remoteStatusCode: 202,
remoteMessage: '',
remoteCode: '',
remoteDetail: '',
responseTime: 0.975 } }
```
The issued command looks something like this:
```
await nova.createServerImage(serverId, {
"name" : `image ${dateformat(new Date(), "dd/mm/yyyy HH:MM")}`,
"metadata": {
"test_var": "test_val"
}
}, (error, result) => {
if (error) {
console.log(error); // will output the earlier error
}
console.log(result); // will be undefined
});
```
even though the image is created fine, also seen by the remoteStatusCode `202`.
I want to know if this is a problem with the cloud provider (OVH) because there is no body in their response.
貢獻指南
研究方向
從 createServerImage 開始,檢查 lib/os-request.js 中 _getRequestError(第 219 行)和 Request._callback(第 316 行)附近的回應處理。重現帶有空 body 的 202 回應,並比較成功回應和錯誤回應是如何分類的。完成標準是:成功的映像建立回應不會被回報為錯誤,同時真正的遠端錯誤仍然可見。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript, nodejs
- 領域
- api, backend
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100