Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Exception handling on "API down for maintenance"

Offen
#964 5 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
20/100
Issue-Typ
Bug
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
java
Bereich
api

Rechercherichtung

Beginne mit dem verknüpften Promregator issue, den CAPI release notes und full-error.txt, um die Wartungsantwort ohne JSON und die daraus resultierende CorruptedFrameException zu verstehen. Im issue werden keine Repository-Dateien oder Tests genannt; die Arbeit ist erst abgeschlossen, wenn das Projekt entscheidet, wohin dieser Fehler gehört, und die erwartete Ausnahmebehandlung festlegt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement triaged

Documented in the case of https://github.com/promregator/promregator/issues/96#issuecomment-490585118, Promregator (a consumer of cf-java-client) encountered the situation that the CF Cloud Controller did not respond with a proper response, but only returned the ASCII string

API down for maintenance

instead of the corresponding JSON.
I stumbled over https://github.com/cloudfoundry/capi-release/releases/tag/1.77.0, where the second line in the highlights suggests that this is a standard behavior of the platform (and also might have reported that error without providing the appropriate HTTP status code of 503).

Based on the logs, it seems that cf-java-client today reacts to just forward an exception of type io.netty.handler.codec.CorruptedFrameException. It is clear that the corresponding request cannot be fulfilled and some sort of error reporting/exception handling must take place in this case.

What is unclear to me is who should be in charge of handling such a kind of exception. I doubt that a consumer application should catch exceptions raised by netty due to a decoding issue. Moreover, the situation appears to be (perhaps not a desired situation, but still) a response that may happen from time to time. One may also argue whether this is covered by the contract.

What is your opinion about all this? Should the consumer of cf-java-client handle this kind of failure by catching io.netty.handler.codec.CorruptedFrameException?

Vorherrschende Sprache
Java
Sterne
334
Forks
319
Ø Merge
3 T. 19 Std.
Gemergte PRs (30 T.)
4

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

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 cloudfoundry/cf-java-client

Alle Issues in cloudfoundry/cf-java-client

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

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