Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get response body from partial success batch response #965

Open
owenpearson opened this issue Jul 18, 2023 · 2 comments
Open

Unable to get response body from partial success batch response #965

owenpearson opened this issue Jul 18, 2023 · 2 comments
Labels
bug Something isn't working. It's clear that this does need to be fixed.

Comments

@owenpearson
Copy link
Member

owenpearson commented Jul 18, 2023

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.

┆Issue is synchronized with this Jira Task by Unito

@owenpearson owenpearson added the bug Something isn't working. It's clear that this does need to be fixed. label Jul 18, 2023
@sync-by-unito
Copy link

sync-by-unito bot commented Jul 18, 2023

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3730

@SimonWoolf
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. It's clear that this does need to be fixed.
Development

No branches or pull requests

2 participants