Skip to content

Conversation

@petruki
Copy link
Member

@petruki petruki commented Jul 19, 2025

This pull request enhances error handling in the CoreHandler to recover gracefully from panics in the comparatorService and introduces corresponding tests to ensure robustness. The key changes include adding a defer statement in the checkForChanges method to handle panics, creating a FakeComparatorService for testing, and adding a new test case to verify the behavior when a panic occurs.

Error Handling Enhancements:

  • src/core/handler.go: Updated the checkForChanges method to include a defer block that recovers from panics in the comparatorService, ensuring the method returns empty results and an error message when a panic occurs. This prevents crashes due to inconsistent repository data.

@petruki petruki added this to the v1.0.1 milestone Jul 19, 2025
@petruki petruki self-assigned this Jul 19, 2025
@petruki petruki added the enhancement New feature or request label Jul 19, 2025
@sonarqubecloud
Copy link

@petruki petruki merged commit 57cc09f into master Jul 19, 2025
5 checks passed
@petruki petruki deleted the staging branch July 19, 2025 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants