summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/buildstream/sandbox/_sandboxremote.py8
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(