Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCP Storage error with unclear message #342

Open
evbo opened this issue Jan 28, 2025 · 1 comment
Open

GCP Storage error with unclear message #342

evbo opened this issue Jan 28, 2025 · 1 comment

Comments

@evbo
Copy link

evbo commented Jan 28, 2025

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

@yoshidan
Copy link
Owner

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)." }))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants