[
https://issues.apache.org/jira/browse/JENA-1321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15973327#comment-15973327
]
ASF GitHub Bot commented on JENA-1321:
--------------------------------------
Github user afs commented on a diff in the pull request:
https://github.com/apache/jena/pull/241#discussion_r112040546
--- Diff:
jena-arq/src/main/java/org/apache/jena/sparql/engine/http/QueryExceptionHTTP.java
---
@@ -63,11 +66,21 @@ public QueryExceptionHTTP(int responseCode)
public int getResponseCode() { return responseCode ; }
- /** The messge for the reason for this exception
+ /** The message for the reason for this exception
* @return message
*/
public String getResponseMessage() { return responseMessage ; }
+ /** The response for this exception
+ * @return response
+ */
+ public String getResponse() { return response ; }
+
+ /** The status line for the response for this exception
+ * @return status line
--- End diff --
"The status line for the response if available from HTTP"
> Exception rewrapping in HttpQuery masks error response from the server
> ----------------------------------------------------------------------
>
> Key: JENA-1321
> URL: https://issues.apache.org/jira/browse/JENA-1321
> Project: Apache Jena
> Issue Type: Improvement
> Components: ARQ
> Affects Versions: Jena 3.2.0
> Environment: Client: Grails 3.2.8, Windows 7
> Server: Oracle Joseki server on Tomcat 8 (RHEL)
> Reporter: Russell Morrisey
> Assignee: A. Soroka
> Original Estimate: 20m
> Remaining Estimate: 20m
>
> When the SPARQL server responds to a request with an error (e.g. 500 error),
> the Tomcat error response body provides detailed information about what went
> wrong. This response information is included in the underyling HttpException,
> but is being masked by faulty error handling code in
> org.apache.jena.sparql.engine.http.HttpQuery.
> The rewrap() method should specify httpEx as the root cause of the exception,
> not httpEx.getCause(). This will ensure that the response body information is
> preserved.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)