microsoftgraph / microsoftgraph/msgraph-sdk-java
Runtimeexception is thrown if network is lost (or for any other IOException)
まだ誰も着手していません。
- 主要言語
- Java
- スター
- 444
- フォーク
- 154
- 平均マージ
- 18時間 28分
- マージ済み PR(30日)
- 4
説明
Describe the bug
We encountered a crash in our application due to the Graph SDK declaring ApiException, but the underlying kiota implementation throwing a RuntimeException whenever a network issue occurs:
https://github.com/microsoft/kiota-java/blob/94287cd2e04d028d46a9a27c9391766c05fde0b7/components/http/okHttp/src/main/java/com/microsoft/kiota/http/OkHttpRequestAdapter.java#L768
I created an issue on https://github.com/microsoft/kiota-java/issues/1878 but was told RuntimeException is "widely used in early stages libraries".
I would request that the Graph SDK either catches this RuntimeException and throws an ApiException or that the documentation is updated to make users of the library aware of the need to handle a RuntimeException whenever a mobile device loses connectivity.
Expected behavior
An ApiException is thrown by the graphclient if an IO error occurs
How to reproduce
activate airplane mode while using graphclient
SDK Version
6.38.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
No response
Configuration
- OS: Android
Other information
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、Kiota 実装内のリンク先の OkHttpRequestAdapter.java の箇所と、Graph SDK の ApiException 処理を確認します。Android クライアントを機内モードにして失敗を再現し、そのうえで、最終的な動作として IO エラーに対して ApiException を表面化させるべきか、RuntimeException の回避策を文書化すべきかを判断します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- api
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100