Provides predefined gRPC exception classes for Node.js, mapping each gRPC status code (e.g., NotFound, InvalidArgument) to an error class with a corresponding `code` property. Version 1.0.2 is stable with no recent updates. This is a lightweight alternative to manually setting error codes, but minimal download popularity indicates niche or hobbyist use. Does not integrate with @grpc/grpc-js error handling.
npm install grpc-exceptionNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to throw and catch predefined gRPC exceptions, accessing code and message.
Use the class as provided, but note the typo: 'Unknow' instead of 'Unknown'.
Consider using a more maintained library or manually constructing errors.
Use instanceof checks on individual classes, not a common base.
Create a .d.ts file or use @types/grpc-exception (nonexistent).
Use ESM imports (import) instead of require().
Run `npm install grpc-exception` and ensure Node.js version supports ESM if using import syntax.
No dependency data recorded yet.