Closed SpaceCondor closed 1 month ago
From a first look: Agreed, if possible we should also for batch return ODataServiceErrorException
with the correct request object. I raised a PR #543 to see if we can improve this 👍🏼
Forgot to update here: This fix has also been shipped with 5.12.0, thus closing the issue. As usual, ping us if it doesn't work 😉
In the ODataHealthyResponseValidator class there is this bit under
requireHealthyResponse
:https://github.com/SAP/cloud-sdk-java/blob/845ff8349c9a85afad0986f860d3ef6956459f74/datamodel/odata-client/src/main/java/com/sap/cloud/sdk/datamodel/odata/client/request/ODataHealthyResponseValidator.java#L59C1-L72C33
The issue is that if
odataError.isSuccess()
is successful, the preparedException is lost, along with the failed batch request.Should
preparedException
be sent as the cause toODataServiceErrorException
? The constructor parameter is currently null:throw new ODataServiceErrorException(request, httpResponse, msgError, preparedException , odataError.get());