cloud-storage-rs icon indicating copy to clipboard operation
cloud-storage-rs copied to clipboard

Object create and create_streamed always return an Error::Other on a non–200 response

Open db48x opened this issue 2 years ago • 2 comments

The documentation implies that errors from Google become an Error::Google, but https://docs.rs/cloud-storage/latest/src/cloud_storage/client/object.rs.html#126 always creates an Error::Other.

Other("{\n  \"error\": {\n    \"code\": 403,\n    \"message\": \"[email protected] does not have storage.objects.delete access to the Google Cloud Storage object.\",\n    \"errors\": [\n      {\n        \"message\": \"[email protected] does not have storage.objects.delete access to the Google Cloud Storage object.\",\n        \"domain\": \"global\",\n        \"reason\": \"forbidden\"\n      }\n    ]\n  }\n}\n")

db48x avatar Mar 18 '22 14:03 db48x

@db48x Probably, this is not library error. You can try to grant permission to browse bucket for service account.

t4t5u0 avatar Jul 13 '22 16:07 t4t5u0

Sure, the error went away once I fixed the permissions, but that’s not what I am reporting. I am reporting that the type of the error appears to be wrong.

db48x avatar Jul 15 '22 13:07 db48x