-
Notifications
You must be signed in to change notification settings - Fork 184
Updated exit codes with clearer message. #401
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
base: main
Are you sure you want to change the base?
Conversation
|
@gemini-cli /review |
|
🤖 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
casestatement 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.
855ae67 to
0f758cc
Compare
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