Design An Error Model

Use when designing how a backend service (or a fleet of services) reports errors — a typed exception hierarchy (one base + per-status subclasses carrying statusCode/message/data), a validation-error flattener wired into the global ValidationPipe, a global exception filter that maps every throw to ONE uniform response body (+ trace id, severity-based logging, hide internals on 5xx), an RPC/microservice filter twin, and a log-and-swallow decorator for fire-and-forget handlers. NestJS reference, framework-flexible.

kennguyen887 268aba5 7.9 KB Updated

File contents

kennguyen887/agent-foundation/tree/main/skills/design-an-error-model commit 268aba5775

Frequently asked questions

npx skillmds@latest add kennguyen887/design-an-error-model