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

[Bug] Error handling is not correct #145

Open
thomas-le183 opened this issue Sep 12, 2024 · 0 comments
Open

[Bug] Error handling is not correct #145

thomas-le183 opened this issue Sep 12, 2024 · 0 comments

Comments

@thomas-le183
Copy link

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

@thomas-le183 thomas-le183 changed the title [Bug] [Bug] Error handling is not correct Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant