- Use custom error classes extending `Error` with `cause` property for error chaining.
- Handle `uncaughtException` and `unhandledRejection` for graceful shutdown.
- Use `process.exitCode` instead of `process.exit()` to allow cleanup.
- Wrap async route handlers to catch and forward errors to error middleware.
- Never swallow errors with empty catch blocks — log and rethrow or handle explicitly.
- Use custom error classes extending `Error` with the `cause` property for error chaining (`new AppError('msg', { cause: originalError })`).
- Handle `uncaughtException` and `unhandledRejection` process events for graceful shutdown and logging.
- Use `process.exitCode = 1` instead of `process.exit(1)` to allow pending I/O and cleanup to complete.
- Use `AbortController` and `AbortSignal` for timeout and cancellation patterns in async operations.
- Never swallow errors with empty catch blocks — log the error and either rethrow or handle explicitly.
- Use `EventEmitter.captureRejections = true` to automatically catch async errors in event handler callbacks.