A utility library for decoding gRPC error details from the `grpc-status-details-bin` metadata. Version 1.0.1 (stable). Works with any gRPC client library that enriches errors with the `grpc-status-details-bin` trailer, including `@grpc/grpc-js`. Parses the binary protobuf content into a JavaScript object with typed details (e.g., RetryInfo, DebugInfo). No external runtime dependencies; all required protobuf types are bundled. Simpler alternative to manually using `google-rpc` protobufs.
npm install grpc-error-statusNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Parses a gRPC error from a client call and prints the structured error details.
Check for null explicitly with if (status !== null) or if (status != null).
Ensure your gRPC client is configured to propagate the grpc-status-details-bin trailer (standard in @grpc/grpc-js).
Pin protobufjs to v6.x in your project if you encounter issues, or use an alternative like @grpc/grpc-js error handling.
Use const { parse } = require('grpc-error-status'); or import * as grpcStatus from 'grpc-error-status' in ESM.Check if status is not null before calling toObject().
Ensure grpc-error-status is the only version of protobufjs used, or load types manually before calling parse().