Skip to content

Conversation

@megha1188
Copy link

@megha1188 megha1188 commented Nov 26, 2025

This PR improves error handling by providing more specific error messages based on the exit code from the Gemini CLI.

Previously, the action would exit with a generic "Gemini CLI execution failed" message. This change introduces a case statement that maps common exit codes to user-friendly messages, making it easier to diagnose the root cause of a failure. The action now also exits with the original exit code from the Gemini CLI, which can be useful for scripting and automation.

For example, a failure due to an invalid API key will now produce the message: "Gemini CLI execution failed (Authentication failure. Please check your credentials (API key or Google Cloud auth))" and exit with code 41.

Related Issue #217

@MJjainam
Copy link
Collaborator

@gemini-cli /review

@gemini-cli
Copy link

gemini-cli bot commented Nov 26, 2025

🤖 Hi @MJjainam, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

Copy link

@gemini-cli gemini-cli bot left a comment

Choose a reason for hiding this comment

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

## 📋 Review Summary

This pull request introduces a valuable improvement to error handling in the action. By mapping specific exit codes from the Gemini CLI to user-friendly error messages and preserving the original exit code, it will be much easier for users to diagnose and debug failures.

🔍 General Feedback

  • The use of a case statement is clean and effective for handling the different exit codes.
  • The enhanced error messages are clear and will significantly improve the user experience.
  • The change to exit with the original exit code is a great enhancement for users who rely on this action in larger scripts.

@megha1188 megha1188 force-pushed the main branch 2 times, most recently from 855ae67 to 0f758cc Compare November 26, 2025 06:59
@MJjainam MJjainam self-requested a review November 26, 2025 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants