Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing support for creating gRPC errors w/ tralling metadata. #2939

Merged
merged 1 commit into from
Jan 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/google/cloud/_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ class _GAXBaseAPI(object):
def __init__(self, **kw):
self.__dict__.update(kw)

def _make_grpc_error(self, status_code):
def _make_grpc_error(self, status_code, trailing=None):
from grpc._channel import _RPCState
from google.cloud.exceptions import GrpcRendezvous

details = 'Some error details.'
exc_state = _RPCState((), None, None, status_code, details)
exc_state = _RPCState((), None, trailing, status_code, details)
return GrpcRendezvous(exc_state, None, None, None)

def _make_grpc_not_found(self):
Expand Down