Skip to content

feat: #7510 Display a dedicated message when receiving an HTTP 403#7575

Merged
aikebah merged 7 commits intomainfrom
7510-improve-error-message
Apr 9, 2025
Merged

feat: #7510 Display a dedicated message when receiving an HTTP 403#7575
aikebah merged 7 commits intomainfrom
7510-improve-error-message

Conversation

@nhumblot
Copy link
Copy Markdown
Collaborator

@nhumblot nhumblot commented Apr 4, 2025

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
@nhumblot nhumblot requested a review from jeremylong April 4, 2025 07:18
@boring-cyborg boring-cyborg bot added core changes to core tests test cases utils changes to utils labels Apr 4, 2025
@nhumblot nhumblot force-pushed the 7510-improve-error-message branch from e64484b to 87cacfe Compare April 5, 2025 13:16
@aikebah
Copy link
Copy Markdown
Collaborator

aikebah commented Apr 6, 2025

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.

@nhumblot nhumblot 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
@nhumblot nhumblot marked this pull request as ready for review April 7, 2025 06:22
Copy link
Copy Markdown
Collaborator

@jeremylong jeremylong left a comment

Choose a reason for hiding this comment

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

LGTM

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

Labels

core changes to core tests test cases utils changes to utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server status: 403 - Server reason: Forbidden

3 participants