Skip to content

Decodes grpc-status-details-bin content

License

Notifications You must be signed in to change notification settings

monsterzz/grpc-error-status

Repository files navigation

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.

About

Decodes grpc-status-details-bin content

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published