google-cloud-rust
google-cloud-rust copied to clipboard
GCP Storage error with unclear message
I am using thiserror to consume your errors:
#[error(transparent)]
GoogleCloudStorage(#[from] google_cloud_storage::http::Error),
But the error I'm getting is unclear what it means when I call to_string() on the error:
Deadline=9.991251256s; Channel_1308{reachable=true, securely_reachable=true, lameduck=false}
This happens when I call:
#[cfg_attr(feature = "trace", tracing::instrument(skip_all))]
pub async fn upload_object<T: Into<Body>>(
&self,
req: &UploadObjectRequest,
data: T,
upload_type: &UploadType,
) -> Result<Object, Error>
Any suggestions how to get more informative error messages? Also, does this mean something timed out? How do I set a higher timeout setting?
Version: 0.22.1
Have you tried the Debug output?
You should get all the information on the Error structure.
tracing::info!("{:?}", err);
2025-01-30T08:57:35.538564Z INFO google_cloud_storage::client::test: GoogleCloudStorage(Response(ErrorResponse { code: 403, errors: [ErrorResponseItem { domain: "global", location: None, location_type: None, message: "[email protected] does not have storage.objects.create access to the Google Cloud Storage object. Permission 'storage.objects.create' denied on resource (or it may not exist).", reason: "forbidden" }], message: "[email protected] does not have storage.objects.create access to the Google Cloud Storage object. Permission 'storage.objects.create' denied on resource (or it may not exist)." }))