Domain exception hierarchy, error codes, GraphQL error formatting, and error logging standards for a NestJS + GraphQL backend.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Error Handling Skill
## Scope
Apply this skill for any task involving error handling, exception design, error responses, or error logging. This project uses **NestJS** with **GraphQL** (code-first) and a global exception filter.
---
## Error Philosophy
Errors are not exceptional — they are expected outcomes that the system must handle gracefully. The error handling strategy has three goals:
1. **Clients receive actionable, consistent error responses** — never raw stack traces or framework errors
2. **Developers can diagnose issues quickly** — structured logs with full context
3. **The system fails safely** — invalid state is never persisted, partial operations are rolled back
---
## Domain Exception Hierarchy
### Base Exception
All domain exceptions extend a base `DomainException` that carries a machine-readable error code:
```typescript
export abstract class DomainException extends Error {
abstract readonly code: string;
constructor(message: string) {
super(message);
this.name = this.constructor.name;
}
}
```
### Naming Convention
Exception class names describe **what went wrong**, not what the system tried to do:
| Pattern | Example |
|---|---|
…
The line at the top of this page pins the label git:20260610.47ec162, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
GET https://markdownregistry.com/api/v1/artifacts/art_jkhlmzm3vjshbzp4
GET https://markdownregistry.com/api/v1/resolve?ref=jvoliveiran/constellation-harness/error-handling
GET https://markdownregistry.com/api/v1/blob/11033bc593bf9c93487573ee468c475c1f05a1e593700413eb1e13771d117487
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
jvoliveiran/constellation-harness · plugins/constellation-stack-frontend/skills/frontend-design/SKILL.md · Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to…
jvoliveiran/constellation-harness · plugins/constellation-stack-infra/skills/oci-container-platform/SKILL.md · Running Docker containers and databases on OCI inside the Always Free tier — the AWS Lightsail equivalent built from…
jvoliveiran/constellation-harness · plugins/constellation-stack-node/skills/graphql-federation/SKILL.md · How to build a graphql federated API approach, composing a supergraph based on subgraph graphql servers
jvoliveiran/constellation-harness · plugins/constellation-stack-node/skills/graphql/SKILL.md · How to use graphql with Nestjs and Typescript on a code-first approach
jvoliveiran/constellation-harness · plugins/constellation-stack-node/skills/nestjs/SKILL.md · Most recommended practices and modules to use alongside with NestJS framework for backend development
jvoliveiran/constellation-harness · plugins/constellation-stack-node/skills/observability/SKILL.md · Logging, tracing, and monitoring standards using Winston and OpenTelemetry in a NestJS + TypeScript backend
jvoliveiran/constellation-harness · plugins/constellation-stack-node/skills/prisma-migrations/SKILL.md · Best practices for Prisma schema changes, migrations, seeding, and rollback in a NestJS + TypeScript backend
jvoliveiran/constellation-harness · plugins/constellation-stack-node/skills/schema-compatibility/SKILL.md · Detect breaking vs safe changes in the auto-generated GraphQL schema to prevent downstream consumer breakage
thedaviddias/front-end-checklist · skills/error-handling/SKILL.md · Use when reviewing scripts, client components, bundles, or runtime behavior related to Implement proper error handling…
ericrisco/rsc-harness · skills/error-handling/SKILL.md · Use when designing the reaction to a class of failures — typed error taxonomies, retry/backoff/timeout policy, circuit…