fix(#27): Implement uniform error handling with standardized format
Some checks are pending
Docker Test / test (push) Waiting to run
Some checks are pending
Docker Test / test (push) Waiting to run
This commit is contained in:
parent
ad03a47ed8
commit
e4098e3e2a
3 changed files with 91 additions and 10 deletions
24
docs/adr/001-error-handling.md
Normal file
24
docs/adr/001-error-handling.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# 1. Einheitliches Fehlerformat
|
||||
|
||||
## Status
|
||||
|
||||
Akzeptiert
|
||||
|
||||
## Kontext
|
||||
|
||||
Die Anwendung hat momentan unklare und inkonsistente Fehlermeldungen, was die UX und das Debugging erschwert. Es ist notwendig, ein einheitliches Format für Fehlermeldungen zu definieren.
|
||||
|
||||
## Entscheidung
|
||||
|
||||
Wir implementieren ein einheitliches Fehlerformat mit folgenden Feldern:
|
||||
|
||||
- `code`: Ein eindeutiger Fehlercode (z.B. `VALIDATION_ERROR`, `DATABASE_ERROR`)
|
||||
- `message`: Eine menschenlesbare Fehlermeldung
|
||||
- `details`: Zusätzliche technische Details zur Fehlerursache
|
||||
- `requestId`: Eine eindeutige ID für die Anfrage, um Debugging zu erleichtern
|
||||
|
||||
## Konsequenzen
|
||||
|
||||
- Verbesserte UX durch konsistente Fehlermeldungen
|
||||
- Einfacheres Debugging durch einheitliche Fehlerstruktur
|
||||
- Bessere Dokumentation der API-Fehler
|
||||
Loading…
Add table
Add a link
Reference in a new issue