Server implementation of the gRPC Rich Error Model for Node.js, providing structured error details like retry info, error info, debug info, and more. Version 0.0.21 is the latest stable release, updated with TypeScript support and matching the gRPC specification. The package fills a gap in the official Node.js gRPC library, which lacks rich error support, unlike gRPC-Web. It integrates seamlessly with @grpc/grpc-js and offers a builder pattern for creating complex error responses.
npm install grpc-rich-error-modelNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a gRPC server that returns a rich error with retry info when a method is called.
Use callback(status) where status is the built object.
Check client library support for rich errors.
Upgrade to >=0.0.19 and use createStatusBuilder().
Ensure each detail object has type (string) and value (object) properties.
Use grpc.status constants (e.g., grpc.status.INVALID_ARGUMENT).