What problem does it solve?
Inconsistent or incorrect error handling in NestJS microservices and the API gateway leads to wrong gRPC status codes, improper HTTP mappings, swallowed exceptions, and blocked RabbitMQ queues. This Skill helps engineers convert ad-hoc exceptions into standardized BaseRpcException usage, apply TypeORM exception filters, and implement explicit ack/nack semantics so errors are observable and routed correctly.
Core Features & Use Cases
- gRPC status mapping: Decide and enforce correct gRPC status codes for not found, invalid arguments, permission errors, duplicates, transient failures, and internal errors.
- BaseRpcException patterns: Provide canonical throw patterns for services so microservices never use HttpException subclasses and always supply specific status codes.
- TypeORM exception filters: Add and apply filters for EntityNotFoundError and QueryFailedError to translate DB errors into appropriate gRPC statuses.
- RabbitMQ ack/nack handling: Ensure every RMQ handler acknowledges or rejects messages with clear rules for requeue vs dead-letter behavior.
- Anti-pattern detection and fixes: Review code to flag HttpException in microservices, silent catch blocks, missing nacks, and global misuse of INTERNAL status, then show corrected implementations.
Quick Start
Paste the NestJS service, controller, or RabbitMQ handler code you want reviewed and request a focused error handling audit that returns identified issues and corrected implementations.