Dynamic error messages

Offen
#14,692 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
18/100
Issue-Typ
Feature
Klarheit
Muss geklärt werden
Aktivitätsstatus
Aktiv
Tech-Stack
java
Bereich
api, backend

Rechercherichtung

The issue proposes extending ACS exceptions such as CloudRuntimeException with optional multi-message constructors, then choosing the message in API responses by the caller's Role type. Start by reading how CloudRuntimeException is defined and how API error responses are built from it, and note that the role check has no defined design yet. Done means maintainers have agreed on the exception and role-based message design, and only then should code change.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

The required feature described as a wish

As a Admin I would like to have more informative error messages. Meanwhile, I do not want the end-users to receive too much information about the system or infrastructure. It would be interesting to have a way so that the APIs return different errors depending on my Role type.

Without putting too much thought into it, we could extend the ACS exceptions, like the CloudRuntimeException, to have optional constructors with multiple messages, and when returning those messages in the API response we would check for the Role type and send the correct message.

Vorherrschende Sprache
Java
Sterne
3.1k
Forks
1.4k
Ø Merge
7 T. 16 Std.
Gemergte PRs (30 T.)
15

Entwicklungsumgebung

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 apache/cloudstack

Alle Issues in apache/cloudstack

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

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