ably-java
ably-java copied to clipboard
Unable to get response body from partial success batch response
using batch response without the newBatchResponse format, when receiving a partial success response Rest.request throws an error and does not expose the response body which makes it impossible to programatically determine which members of the batch were successful.
➤ Automation for Jira commented:
The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3730
On one hand, yeah, according to the spec, rest#request shouldn't be throwing an error if it receives an error response.
On the other hand... I kindof like this behaviour better than what the spec wants...? I don't really like the current rest#request behaviour, it's weird and different from every other api, and I've proposed changing it to basically this. The only sticking point would have been the batch-partial-success case, but the old batch response is deprecated, we can just push forward with the new format.
in any case -- fixing rest.request to be what the spec wants would be a breaking change, so we can't make it until the next major version of ably-java. In which case we may as well not bother, because the next major version can send v=3 and get the new format by default, so it won't be an issue any more.
wdyt?