[
https://issues.apache.org/jira/browse/CXF-7929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16726431#comment-16726431
]
Vijay Kumar commented on CXF-7929:
----------------------------------
ok, in that case. can i clone the whole code from git
([https://github.com/apache/cxf/tree/540bb76f6f3d3d23944c566905f9f395c6f86b79)]
and try to make it part of my debug ?
so that i can understand what is happening at
[https://github.com/apache/cxf/blob/540bb76f6f3d3d23944c566905f9f395c6f86b79/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/SpecExceptions.java#L62]
> org.apache.cxf.jaxrs.client.AbstractClient.convertToWebApplicationException
> is changing actual error cause and error http status
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: CXF-7929
> URL: https://issues.apache.org/jira/browse/CXF-7929
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 3.1.12
> Reporter: Vijay Kumar
> Priority: Major
> Attachments: image-2018-12-20-10-35-19-884.png
>
>
> I would like to understand details of changing error / exception details
> org.apache.cxf.jaxrs.client.AbstractClient.convertToWebApplicationException(AbstractClient.java:511)
> at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:901)
> at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:862)
> at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:427)
> at org.apache.cxf.jaxrs.client.WebClient.get(WebClient.java:607)
>
> +*Scenario:*+ ** We are facing a scenario where my program throws an
> exception with needful details as
> cause: document with name <docName> not available in the repository
> errorCode: 404
> as
> java.lang.RuntimeException: Document with name <docName> not available in the
> repository
> but from
> org.apache.cxf.jaxrs.client.AbstractClient.convertToWebApplicationException
> method it is converted to
> code: 500
> cause: Internal Server Error
> Due to this conversion we are not able to understand / catch actual cause of
> the error / exception.
>
> Fare Scenario:
> # I have file in repo
> 2. i have rest client api to download (etc)
> # My rest client api uses org.apache.cxf.jaxrs.client
> # When there is no file to download, my api throwing an runtime exception
> with a cause of details.
> # however the exception is handled by
> org.apache.cxf.jaxrs.client.WebClient.get() is modifying the exception
> details as internal server error, 500.
> org.apache.cxf.jaxrs.client.AbstractClient.convertToWebApplicationException(AbstractClient.java:511)
> at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:901)
> at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:862)
> at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:427)
> at org.apache.cxf.jaxrs.client.WebClient.get(WebClient.java:607)
>
> Please be informed that i have gone through the class details of WebClient
> and AbstractWebClient
>
> Please let me know in case of any info needed.
>
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)