Skip to content

Consider showing cause of errors from Google Cloud #65

@ccjernigan

Description

@ccjernigan

Problem:
This try-catch hides underlying error messages from Google Cloud, which makes it very difficult to identify the root cause of configuration issues.

I recently tried setting up the gcp-gradle-build-cache with workload identity federation. I first followed the instructions from the Google Auth GitHub Action for workload identity federation through a device account. Then I followed the instructions in this project for setting up the Google Cloud storage and permissions. The result was error messages saying my token was expired, which I knew wasn't accurate.

Solution:
Can the code be updated to propagate the cause of the exception?

In my case the underlying error was a disabled API in Google Cloud, which became clear once I modified the code to include the underlying cause which told me: "IAM Service Account Credentials API has not been used in project X before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/iamcredentials.googleapis.com/overview?project=X then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions