github-tools / github-tools/github
Cannot read property 'status' of undefined error when there is no network
未關閉
bug
- 主要語言
- JavaScript
- 星號
- 3.8k
- 分支
- 809
- PR 合併指標
- 30 天內沒有已合併 PR
描述
When there is no network the `_request` function fails, without rejecting the Promise, which makes impossible to catch the error when using a callback.
Even though the component can't be used without the network (#388), I think would be good to handle the case.
The error:
`TypeError: Cannot read property 'status' of undefined`
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
首先定位 `_request` 函式,並重現 issue 中描述的無網路情況。檢查 issue #388 中的相關脈絡,接著確保失敗的請求 reject 其 Promise,讓 callback 使用者能夠捕捉錯誤;當未定義的 `status` 錯誤得到處理而不是逸出時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript
- 領域
- api
- Issue 類型
- 缺陷
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100