NAME
Google::gRPC::Status - Rich gRPC status and grpc-status-details-bin trailer decoder
SYNOPSIS
use Google::gRPC::Status;
my $status = Google::gRPC::Status->from_trailer($grpc_status_details_bin);
print $status->code(), ': ', $status->message(), "\n";
for my $detail (@{ $status->details() }) {
print $detail->{type_url}, "\n";
}
DESCRIPTION
Google::gRPC::Status decodes binary (or Base64-encoded) google.rpc.Status payloads carried in the HTTP/2 grpc-status-details-bin trailer into structured code, message, and details (ArrayRef of { type_url = ..., value => ... }> entries).
ATTRIBUTES
code - Numeric gRPC status code (defaults to
0/ OK).message - Human-readable error message.
details - ArrayRef of decoded
google.protobuf.Anydetail hashes.
METHODS
from_trailer( $raw )
Class method that decodes a grpc-status-details-bin header value (Base64 or raw binary) and returns a Google::gRPC::Status instance.
parse_status_details( $raw )
Underlying wire decoder called by from_trailer().
SEE ALSO
Google::gRPC, Google::gRPC::Framing, Google::gRPC::Client
AUTHOR
C.J. Collier <cjac@google.com>
LICENSE
Apache License 2.0