grpc-error-status

1.0.1 • Public • Published

grpc-error-status

Build Status

Install package:

npm install grpc-error-status --save

Working with gRPC errors made easy:

const grpcStatus = require('grpc-error-status');

client.sayHello({name: 'you'}, (err, resp) => {
  const status = grpcStatus.parse(err);
  if (status != null) {
    console.log(status.toObject());
    return;
  }
  console.log('Greeting:', response.message);
});

All required types are included. See protos/google/rpc/*.proto to find possible types of error details and Status structure.

Readme

Keywords

Package Sidebar

Install

npm i grpc-error-status

Weekly Downloads

335

Version

1.0.1

License

MIT

Unpacked Size

106 kB

Total Files

16

Last publish

Collaborators

  • monsterzz