Conversation

nhumblot

Description of Change

The proposed change aims to add a more explicit message to the user when it is facing an HTTP 403 status code from Maven central search.

The change introduces ForbiddenException, a subclass of IOException. This fully preserve the behavior of any code using the utils module as a dependency.

I am open to comments and discussions on this change proposal, thank you for your help!

Related issues

Fixes #7510

Have test cases been added to cover the new functionality?

no

BREAKING CHANGE: adds a new checked exception as a return type of the
utils module public API
@nhumblotnhumblot requested a review from jeremylong April 4, 2025 07:18
@boring-cyborgboring-cyborg bot added corechanges to coreteststest casesutilschanges to utilslabels Apr 4, 2025
@nhumblotnhumblot force-pushed the 7510-improve-error-message branch from e64484b to 87cacfe Compare April 5, 2025 13:16
@aikebah

In my view no need to ever make it a direct subclass of Exception. Your second alternative option of a dedicated subclass of IOException would be perfectly valid as a final solution to offer the opportunity to separately catch it in cases where you'd like to handle it differently from other I/O errors.

@nhumblotnhumblot changed the title feat!: #7510 Display a dedicated message when receiving an HTTP 403 feat: #7510 Display a dedicated message when receiving an HTTP 403 Apr 6, 2025
@nhumblotnhumblot marked this pull request as ready for review April 7, 2025 06:22

Choose a reason for hiding this comment

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

LGTM

@aikebahaikebah added this to the 12.1.2 milestone Apr 9, 2025
@aikebahaikebah merged commit 9640164 into main Apr 9, 2025
10 checks passed
@nhumblotnhumblot deleted the 7510-improve-error-message branch April 10, 2025 12:35
@github-actions-actions bot locked as resolved and limited conversation to collaborators May 11, 2025
Sign up for free to subscribe to this conversation on . Already have an account? Sign in.
corechanges to coreteststest casesutilschanges to utils
None yet

Successfully merging this pull request may close these issues.

Server status: 403 - Server reason: Forbidden