Skip to content

JCL-402: Refactor HTTP exception constructors - #1161

Closed
NSeydoux wants to merge 14 commits into
JCL-460/problem-details-class-http-statusfrom
JCL-402/problem-details-exceptions
Closed

JCL-402: Refactor HTTP exception constructors#1161
NSeydoux wants to merge 14 commits into
JCL-460/problem-details-class-http-statusfrom
JCL-402/problem-details-exceptions

Conversation

@NSeydoux

Copy link
Copy Markdown
Contributor

The HTTP exception are now built taking a ProblemDetails in.

Initial ClientHttpException class
Create HTTP status enum
Add some tests
Add javadoc
Refactor HttpStatus
Add specialized builder to ProblemDetails
Add missing header
Make problem details parsing more resilient
Add tests for problem details parsing
The tests are in the solid-client module, because it will need the
additional json service anyways in the test dependencies for testing the
rest of this feature, and putting these tests in the api module creates
a circular dependency.
License header
@NSeydoux
NSeydoux marked this pull request as ready for review April 14, 2024 22:07
@NSeydoux
NSeydoux requested a review from a team as a code ownerApril 14, 2024 22:07

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would it not make more sense to move all the relevant fields and properties to the ClientHttpException?
It seems to belong there rather on this specialization.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Indeed, and actually because 2ed0a03 embeds the JSON service discovery in the ProblemDetails class, b27cd0a directly builds the problem details from the error response content, which means all the deprecations here are no longer necessary.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Actually these changes make this PR small enough that it can be bundled together with #1160

@NSeydoux
NSeydouxforce-pushed the JCL-402/problem-details-exceptions branch from 608e632 to 92358faCompareApril 16, 2024 07:51
@NSeydoux
NSeydouxforce-pushed the JCL-402/problem-details-exceptions branch from 92358fa to c41758eCompareApril 16, 2024 08:08
@NSeydoux

Copy link
Copy Markdown
ContributorAuthor

I applied the changes here to #1160

@NSeydoux
NSeydouxforce-pushed the JCL-460/problem-details-class-http-status branch from 8b193a9 to 71d6302CompareApril 16, 2024 20:47
@NSeydoux

Copy link
Copy Markdown
ContributorAuthor

This is no longer required based on the refactoring of #1160 .

@acoburn
acoburn deleted the JCL-402/problem-details-exceptions branch May 29, 2024 18:54
Sign up for freeto 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.

2 participants

@NSeydoux@langsamu