[ 
https://issues.apache.org/jira/browse/OLINGO-1423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jade Koskela updated OLINGO-1423:
---------------------------------
    Description: 
This affects all versions that I am aware of.

In the case of an HTTP 5xx error, in many cases we are missing the error 
response information. This was reported in OLINGO-1102, but that fix doesn't 
cover many cases. In that fix we will add the error response information to the 
exception if there is error details or inner error. But those aren't required 
for the error response. The only thing that is required is [code and 
message|#_Toc403940655]]. Note that the code and message in the error response 
are not necessarily the same as the HTTP error code and phrase. Also the 
previous fix was misusing the client exception to pass the error response, 
maybe that doesn't matter really, but it's incorrect.

I am attaching a patch for this.

In this patch I extracted a base class for ODataClientErrorException and 
ODataServerErrorException. I always include the error response in the 
exception, if there is one. Otherwise I pass null. This is the same as before.

 

  was:
This affects all versions that I am aware of.

In the case of an HTTP 5xx error, in many cases we are missing the error 
response information. This was reported in OLINGO-1102, but that fix doesn't 
cover many cases. In that fix we will add the error response information to the 
exception if there is error details or inner error. But those aren't required 
for the error response. The only thing that is required is [code and 
message|([http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata02/os/odata-json-format-v4.0-errata02-os-complete.html#_Toc403940655]].
 Note that the code and message in the error response are not necessarily the 
same as the HTTP error code and phrase. Also the previous fix was misusing the 
client exception to pass the error response, maybe that doesn't matter really, 
but it's incorrect.

I am attaching a patch for this. In this patch I extracted a base class for 
ODataClientErrorException and ODataServerErrorException.

 


> ODataServerErrorException missing error information.
> ----------------------------------------------------
>
>                 Key: OLINGO-1423
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1423
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-client
>    Affects Versions: (Java) V4 4.7.1
>            Reporter: Jade Koskela
>            Priority: Minor
>         Attachments: 
> 0001-OLINGO-1102-Add-error-details-for-all-HTTP-5xx-error.patch
>
>
> This affects all versions that I am aware of.
> In the case of an HTTP 5xx error, in many cases we are missing the error 
> response information. This was reported in OLINGO-1102, but that fix doesn't 
> cover many cases. In that fix we will add the error response information to 
> the exception if there is error details or inner error. But those aren't 
> required for the error response. The only thing that is required is [code and 
> message|#_Toc403940655]]. Note that the code and message in the error 
> response are not necessarily the same as the HTTP error code and phrase. Also 
> the previous fix was misusing the client exception to pass the error 
> response, maybe that doesn't matter really, but it's incorrect.
> I am attaching a patch for this.
> In this patch I extracted a base class for ODataClientErrorException and 
> ODataServerErrorException. I always include the error response in the 
> exception, if there is one. Otherwise I pass null. This is the same as before.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to