Skip to content

Error responses partially processed as successful responses #341

Open
@bradjones1

Description

@bradjones1

Describe the bug

While working on bubbling up more contextual data about error conditions (mostly on the HTTP transport) I discovered that error responses are being handled as successful, and then rejected as part of that processing. This (I think) is a result of how batches are handled. However, when handling a standalone response object, this resulted in not being able to directly catch the rejection, as well as the result event being emitted, if you are using the event emitter.

To Reproduce
Steps to reproduce the behavior:

  1. Request a method that results in an error response.
  2. Witness it is processed as a response, and then rejected.

Expected behavior
The response should be handled as an error at the outset.

Desktop (please complete the following information):

  • OS: Linux, Android and iOS
  • Browser: Firefox
  • Version 109.0.1

Additional context
This is fixed as part of my overall error handling improvements on #307

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions