Skip to content

Commit

Permalink
casserver.py: Fix error handling in ByteStream.Read()
Browse files Browse the repository at this point in the history
This proxy server is only used in tests, so this doesn't affect any real
use of BuildStream.
  • Loading branch information
juergbi committed Mar 7, 2025
1 parent ba70052 commit 156ec1a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/buildstream/_cas/casserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,9 @@ def __init__(self, casd, *, enable_push):
def Read(self, request, context):
self.logger.debug("Reading %s", request.resource_name)
try:
ret = self.bytestream.Read(request)
yield from self.bytestream.Read(request)
except grpc.RpcError as err:
context.abort(err.code(), err.details())
return ret

def Write(self, request_iterator, context):
# Note that we can't easily give more information because the
Expand Down

0 comments on commit 156ec1a

Please sign in to comment.