Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
(Java) V4 4.7.1
-
None
-
None
-
Patch
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. 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.