diff options
author | Josh Smith <josh.smith@codethink.co.uk> | 2020-09-03 14:39:15 +0100 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2020-09-07 11:17:35 +0000 |
commit | f527955824474525983b8675b95684eade5eaf99 (patch) | |
tree | 1d83e916e58c39daa3034720460760112cf9c4f2 /src/buildstream | |
parent | 27daa281a6d4ed8b5659e56a12452d28175f9b4b (diff) | |
download | buildstream-f527955824474525983b8675b95684eade5eaf99.tar.gz |
_sandboxremote.py: Include details in UNAVAILABLE error logging
Diffstat (limited to 'src/buildstream')
-rw-r--r-- | src/buildstream/sandbox/_sandboxremote.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/buildstream/sandbox/_sandboxremote.py b/src/buildstream/sandbox/_sandboxremote.py index 41fb9e153..6cba7d611 100644 --- a/src/buildstream/sandbox/_sandboxremote.py +++ b/src/buildstream/sandbox/_sandboxremote.py @@ -214,8 +214,6 @@ class SandboxRemote(SandboxREAPI): except grpc.RpcError as e: status_code = e.code() - if status_code == grpc.StatusCode.UNAVAILABLE: - raise SandboxError("Failed contacting remote execution server at {}.".format(self.exec_url)) if status_code in ( grpc.StatusCode.INVALID_ARGUMENT, @@ -223,8 +221,12 @@ class SandboxRemote(SandboxREAPI): grpc.StatusCode.RESOURCE_EXHAUSTED, grpc.StatusCode.INTERNAL, grpc.StatusCode.DEADLINE_EXCEEDED, + grpc.StatusCode.UNAVAILABLE, ): - raise SandboxError("{} ({}).".format(e.details(), status_code.name)) + raise SandboxError( + "Failed contacting remote execution server at {}." + "{}: {}".format(self.exec_url, status_code.name, e.details()) + ) if running_operation and status_code == grpc.StatusCode.UNIMPLEMENTED: raise SandboxError( |