Skip to content

Conversation

@chiranjib-swain
Copy link
Contributor

Description:
This pull request improves the error handling logic in the getRateLimit method of the IssuesProcessor class to better support environments where GitHub rate limiting is not enabled, such as some GitHub Enterprise Server (GHES) instances.

Error handling improvements for rate limiting:

  • Updated the catch block in the getRateLimit method to specifically check for a 404 error with a message indicating that rate limiting is not enabled, logging a warning and proceeding gracefully without rate limit checks. For all other errors, an error is logged and the method returns undefined to ensure consistent fallback behavior.

Related issue:
#1227

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 October 28, 2025 15:44
@chiranjib-swain chiranjib-swain requested a review from a team as a code owner October 28, 2025 15:44
Copy link
Contributor

Copilot AI left a comment

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 in the getRateLimit method to gracefully handle GitHub Enterprise Server (GHES) instances where rate limiting is disabled, addressing issue #1227.

Key Changes:

  • Added specific handling for 404 errors indicating rate limiting is not enabled
  • Ensured consistent undefined return value across all error paths

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@HarithaVattikuti HarithaVattikuti merged commit fad0de8 into actions:main Nov 5, 2025
8 checks passed
jayudey-wf pushed a commit to jayudey-wf/stale that referenced this pull request Dec 4, 2025
…ons#1300)

* rateLimitResult log

* code update for rate limit

* Refactor getRateLimit method to remove mock responses and improve error handling

* retry logic removed

* Simplify warning message for rate limiting not enabled

* Remove redundant comments in rate limiting error handling

* updated the block to use catch (error: unknown) instead of any and added simple type narrowing for status and message.
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

Successfully merging this pull request may close these issues.

4 participants