计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
nestjs-error-handling【效率与协作】Implement Global Exception Filters and standard error formats in NestJS. Use when implementing global exception filters or standardizing error responses in NestJS.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Request/Response from Express/Fastify types directly.HttpAdapterHost to access underlying platform response methods.const { httpAdapter } = this.httpAdapterHost;ApiErrorResponse. {
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request",
"timestamp": "ISO...",
"path": "/users"
}
EntityNotFoundError).catchError(err => throw new NotFoundException())).NotFoundException, ForbiddenException, BadRequestException.HttpException only for domain-specific failures that need specific status codes.MyClass.name to Logger constructor.error: 500s (Stack trace required).warn: 400s (Client errors).process.env.NODE_ENV === 'production').ApiException payloads not leak internal file paths or raw variable dumps.NODE_ENV === 'production' check.HttpAdapterHost for platform-agnostic error handling.