Skip to content

Conversation

@NSeydoux
Copy link
Contributor

@NSeydoux NSeydoux commented Apr 14, 2024

This is based on #1159 , which should be reviewed first. (The only dependency between the two is in the mocks)

This deprecates the current methods in RDF4JBodyHandlers, and replaces them with similar method throwing an appropriate exception with error details on HTTP error instead of returning an empty dataset. This makes use of the composable throwing body handler now exposed by the Response interface of the api module. The new method now have RDF4J in their name for this not to be a breaking change: ofModel becomes ofRDF4JModel, etc.

@NSeydoux NSeydoux force-pushed the JCL-402/rdf4j-body-handlers branch 2 times, most recently from bd71db4 to 1ef8bee Compare April 14, 2024 22:29
Copy link
Contributor

@langsamu langsamu left a comment

Choose a reason for hiding this comment

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

Same comment as for the Jena proposal.

@NSeydoux NSeydoux force-pushed the JCL-457/jena-body-handler branch from 4b37262 to 39299b6 Compare April 17, 2024 07:59
@NSeydoux NSeydoux force-pushed the JCL-402/rdf4j-body-handlers branch from 1ef8bee to c82183a Compare April 17, 2024 08:10
@NSeydoux NSeydoux marked this pull request as ready for review April 17, 2024 08:11
@NSeydoux NSeydoux requested a review from a team as a code owner April 17, 2024 08:11
@NSeydoux NSeydoux force-pushed the JCL-457/jena-body-handler branch from 39299b6 to f92ed37 Compare April 18, 2024 12:35
@NSeydoux NSeydoux force-pushed the JCL-402/rdf4j-body-handlers branch from 9501c47 to 452ce77 Compare April 18, 2024 12:47
@NSeydoux NSeydoux force-pushed the JCL-457/jena-body-handler branch 2 times, most recently from ffef3bc to b8e402f Compare April 23, 2024 07:51
@NSeydoux NSeydoux force-pushed the JCL-402/rdf4j-body-handlers branch from 4fbd520 to f534a65 Compare April 23, 2024 07:52
@NSeydoux NSeydoux force-pushed the JCL-457/jena-body-handler branch from b8e402f to 63be5e6 Compare April 23, 2024 08:13
Base automatically changed from JCL-457/jena-body-handler to main April 23, 2024 08:29
@NSeydoux NSeydoux force-pushed the JCL-402/rdf4j-body-handlers branch from f534a65 to c795127 Compare April 23, 2024 08:36
@NSeydoux NSeydoux enabled auto-merge (squash) April 23, 2024 08:56
@NSeydoux NSeydoux force-pushed the JCL-402/rdf4j-body-handlers branch from bf051a1 to d0a0003 Compare April 23, 2024 11:13
private static void throwOnError(final Response.ResponseInfo responseInfo) {
if (!Response.isSuccess(responseInfo.statusCode())) {
throw new ClientHttpException(
"Could not map to an RDF4J entity.",
Copy link
Contributor

Choose a reason for hiding this comment

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

The real issue is that the request failed rather been an issue mapping it to a RDF4J entity. Is this message a bit misleading?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see your point. Is 475adc0 better?

@NSeydoux NSeydoux merged commit e03eb1e into main Apr 26, 2024
@NSeydoux NSeydoux deleted the JCL-402/rdf4j-body-handlers branch April 26, 2024 14:43
acoburn added a commit that referenced this pull request May 8, 2024
acoburn added a commit that referenced this pull request May 13, 2024
acoburn added a commit that referenced this pull request May 15, 2024
* Revert "JCL-402: RDF4J body handlers http error handling (#1162)"

This reverts commit e03eb1e.

* Revert "JCL-402: JSONB test coverage (#1184)"

This reverts commit 52d485b.

* Revert "JCL-402: HTTP error handling in JenaBodyHandlers (#1159)"

This reverts commit 89534b4.

* Move ProblemDetails to solid module, remove ClientHttpException

* ProblemDetails to interface in API module
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.

4 participants