All errors of `BatchUploadBlobs` inside `CASClient::uploadBlobs` are masked as INTERNAL

Based on the implementation of grpcclient, buildboxcommon::GrpcError is thrown when the status is non-OK.

However, the error handling block of casclient translates all errors into INTERNAL so the status_code is dropped.

Context

  • Expected behaviour: GRPC errors of BatchUploadBlobs are reported as they are
  • Current behaviour: All GRPC errors of BatchUploadBlobs are masked as INTERNAL

Task Description

  • catch buildboxcommon::GrpcError before std::runtime_error
  • use the status object inside buildboxcommon::GrpcError instead of creating a new one.

Acceptance Criteria

GRPC errors of CASClient::uploadBlobs are reported as they are.

Edited by Zehao Chen