You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Vijay Kumar (JIRA)" <ji...@apache.org> on 2018/12/26 11:36:00 UTC

[jira] [Comment Edited] (CXF-7929) org.apache.cxf.jaxrs.client.AbstractClient.convertToWebApplicationException is changing actual error cause and error http status

    [ https://issues.apache.org/jira/browse/CXF-7929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16728989#comment-16728989 ] 

Vijay Kumar edited comment on CXF-7929 at 12/26/18 11:35 AM:
-------------------------------------------------------------

yeah i am getting 500 there.

I have got few more details based on little debugging on same, 
 Seems to be something is assigning 500 as code from class org.apache.cxf.interceptor.Fault

few details which i observed from org.apache.cxf.jaxrs.JAXRSInvoker, org.apache.cxf.service.invoker.AbstractInvoker class details
 # Before status code coverts as 500, it was 404 only...
 !image-2018-12-26-16-16-02-352.png!

 

2. StatusCode gets as 500
 !image-2018-12-26-16-21-15-698.png!

 

 

Can i request any more inputs from you?

 


was (Author: pasumarthivijaykumar9@gmail.com):
yeah i am getting 500 there.

I have got few more details based on little debugging on same, 
Seems to be something is assigning 500 as code from class org.apache.cxf.interceptor.Fault

few details which i observed from org.apache.cxf.jaxrs.JAXRSInvoker, org.apache.cxf.service.invoker.AbstractInvoker class details
 # Before status code coverts as 500, it was 404 only...
!image-2018-12-26-16-16-02-352.png!

 

2. StatusCode gets as 500
!image-2018-12-26-16-21-15-698.png!

 

 

Can i request any more inputs from you, when try to debug more i am getting read-timeout also...?

 

> 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, image-2018-12-26-16-16-02-352.png, image-2018-12-26-16-21-15-698.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)