0xironclad / 0xironclad/Task-Scheduler-API

Error handling middleware

Offen
#28 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
api dx
Vorherrschende Sprache
TypeScript
Sterne
0
Forks
2
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Centralize JSON error responses with consistent shape `{error:{message,code}}`.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Look for existing error handling in the Express app setup, likely in app.js or a middleware directory. Identify where errors are currently thrown and how they are formatted. Create a middleware function that catches errors, wraps them in the specified JSON shape, and sets appropriate HTTP status codes. Test by triggering different error conditions and verifying the response format.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
express, node.js, typescript
Bereich
api, backend
Issue-Typ
Refactoring
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
55/100

Neue Issues direkt in Ihr Postfach

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