Runtimeexception is thrown if network is lost (or for any other IOException)

Offen
#2,374 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
java
Bereich
api

Rechercherichtung

Beginnen Sie mit der Überprüfung der verlinkten Stelle in OkHttpRequestAdapter.java in der Kiota-Implementierung und der ApiException-Behandlung des Graph SDK. Reproduzieren Sie den Fehler mit dem Android-Client im Flugmodus und ermitteln Sie anschließend, ob das abgeschlossene Verhalten bei IO-Fehlern eine ApiException auslösen oder der RuntimeException-Workaround dokumentiert werden sollte.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

status:waiting-for-triage type:bug
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

Vorherrschende Sprache
Java
Sterne
444
Forks
154
Ø Merge
18 Std. 28 Min.
Gemergte PRs (30 T.)
4

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus microsoftgraph/msgraph-sdk-java

Alle Issues in microsoftgraph/msgraph-sdk-java

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.