Skip to content

Conversation

@NSeydoux
Copy link
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 owner April 14, 2024 22:07
Copy link
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
Contributor Author

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
Contributor Author

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 NSeydoux force-pushed the JCL-402/problem-details-exceptions branch from 608e632 to 92358fa Compare April 16, 2024 07:51
@NSeydoux NSeydoux force-pushed the JCL-402/problem-details-exceptions branch from 92358fa to c41758e Compare April 16, 2024 08:08
@NSeydoux
Copy link
Contributor Author

I applied the changes here to #1160

@NSeydoux NSeydoux force-pushed the JCL-460/problem-details-class-http-status branch from 8b193a9 to 71d6302 Compare April 16, 2024 20:47
@NSeydoux
Copy link
Contributor Author

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

@NSeydoux NSeydoux closed this Apr 17, 2024
@acoburn acoburn deleted the JCL-402/problem-details-exceptions branch May 29, 2024 18:54
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.

3 participants