You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "cozos (via GitHub)" <gi...@apache.org> on 2023/08/31 05:57:56 UTC

[GitHub] [beam] cozos commented on issue #26769: [Bug]: GCS IO publishes uninformative error message

cozos commented on issue #26769:
URL: https://github.com/apache/beam/issues/26769#issuecomment-1700411569

   This code:
   
   ```
   raise type(self._upload_thread.last_error)(
             "Error while uploading file %s: %s",
             self._path,
             self._upload_thread.last_error.message if hasattr(self._upload_thread.last_error, "message") else "")  # pylint: disable=raising-bad-type
   ``` 
   
   Totally breaks Google's [HttpError](https://github.com/google/apitools/blob/master/apitools/base/py/exceptions.py#L50) for me, since it overrides `response` which is expected to be dictionary rather than a message. 
   
   Calling `HttpError.status_code` results in this exception:
   
   ```
   File "/generate_dataset_docker_pybinary.runfiles/cruise_ws/cruise/mlp/cfs/projects/temporal_understanding/generate_dataset_docker_pybinary_exedir/apitools/base/py/exceptions.py", line 78, in status_code
       return int(self.response['status'])
   TypeError: string indices must be integers [while running 'Publish dataset/Write to big query/StoreArtifacts/WriteArtifact-ptransform-158']
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org