Skip to content

[Bug] Error handling is not correct #145

@thomas-le183

Description

@thomas-le183

Hi, I’ve identified some issues with the error handling in your code. Currently, the code only handles responses that include an error message:
const removeListener = this._addListener(requestId, data => { removeListener(); if (data.errorMessage) { const error = new Error(data.errorMessage); error.data = data.data; reject(error); } else { resolve(data); } });
However, there are cases where the response includes an array of errors that aren't being handled correctly. Could you please update the logic to cover this scenario as well?
image

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