Skip to content

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

Open

Description

@owenpearson

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

Activity

  1. added
    bugSomething isn't working. It's clear that this does need to be fixed.
    on Jul 18, 2023
  2. sync-by-unito commented on Jul 18, 2023

    @sync-by-unito

    ➤ Automation for Jira commented:

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

  3. SimonWoolf commented on Jul 18, 2023

    @SimonWoolf
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working. It's clear that this does need to be fixed.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions