From dc9996264079e82902b90d95c3134a4178783175 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 17 Jan 2017 16:12:47 -0500 Subject: [PATCH] Testing support for creating gRPC errors w/ tralling metadata. --- core/google/cloud/_testing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/google/cloud/_testing.py b/core/google/cloud/_testing.py index e862ce00dfc4..f9d2b57fda52 100644 --- a/core/google/cloud/_testing.py +++ b/core/google/cloud/_testing.py @@ -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):