Improve Error Handling for Setup-Java Action to Help Debug Intermittent Failures by gowridurgad · Pull Request #848 · actions/setup-java

Conversation

@gowridurgad

Description:
Improves error handling to provide clearer messages when failures occur during Java setup, making it easier to identify the root cause of intermittent issues in workflows.

Related issue:
#793

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

Copilot AI review requested due to automatic review settings

June 5, 2025 02:24

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves error handling during Java setup by enhancing log messages and better distinguishing between different HTTP error statuses. Key changes include:

  • Introducing a try-catch block around the package download logic.
  • Adding distinct error logging for HTTP 403 and 429 errors.
  • Rethrowing errors after logging their details for further propagation.
Comments suppressed due to low confidence (1)

src/distributions/base-installer.ts:87

  • Consider wrapping the caught error with additional context before rethrowing to aid downstream debugging. For example, throwing a new Error with a message that includes details about the failure may improve error traceability.

mahabaleshwars

aparnajyothi-y

HarithaVattikuti

mergify bot added a commit to ArcadeData/arcadedb that referenced this pull request

Aug 24, 2025

mergify bot added a commit to robfrank/linklift that referenced this pull request

Sep 8, 2025

mergify bot added a commit to ArcadeData/arcadedb that referenced this pull request

Nov 5, 2025