You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Joshua Darnell (Jira)" <ji...@apache.org> on 2020/04/07 02:01:00 UTC
[jira] [Commented] (OLINGO-1380) OData V4: Response header
information is lost in case of exceptions
[ https://issues.apache.org/jira/browse/OLINGO-1380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17076822#comment-17076822 ]
Joshua Darnell commented on OLINGO-1380:
----------------------------------------
Thanks much for adding this. I was wondering whether a similar treatment might be possible for [ODataServerErrorException|[https://github.com/apache/olingo-odata4/blob/1fef3a131ea4cc334151a7f10b67cab6bb424239/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataServerErrorException.java]]?
I'm doing some response code testing in the process of certifying servers and noticed that [the response headers were not being set in this case|[https://github.com/apache/olingo-odata4/blob/e3650599007a917890963fbec6a19b437d519e4d/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractRequest.java#L64-L69]]. I'd be happy to make a PR if that's the best path. However, I wasn't sure whether doing so might not line up with assumptions elsewhere in the code.
> OData V4: Response header information is lost in case of exceptions
> -------------------------------------------------------------------
>
> Key: OLINGO-1380
> URL: https://issues.apache.org/jira/browse/OLINGO-1380
> Project: Olingo
> Issue Type: Bug
> Reporter: Ramya
> Priority: Major
>
> Whenever an exception occurs in client scenarios we throw ODataClientErrorException with statusLine and ODataError. However, the response header information is lost.
> So have new API's in ODataClientErrorException to set and get header information.
> Also, currently if the response is in a Json format only then we can deserialize the entity and form ODataError.
> If the server returns the response as a plain text, then also make provision to include this information in ODataError object.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)