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

Can't catch bad response error #250

Open
bufffun opened this issue Jan 15, 2021 · 4 comments
Open

Can't catch bad response error #250

bufffun opened this issue Jan 15, 2021 · 4 comments

Comments

@bufffun
Copy link

bufffun commented Jan 15, 2021

When the server response with bad reponse format, how can I catch the error?

client.request({ method: "method" }).then().catch(err){ //can't trigger this }

WX20210115-180433

@bufffun bufffun changed the title Can't catch bad reponse error Can't catch bad response error Jan 15, 2021
@zcstarr
Copy link
Member

zcstarr commented Apr 15, 2021

Actually didn't realize this was from Jan. I missed this in the pipeline we'll have a quick look

@bradjones1
Copy link

Seems at current you'd have to register an event listener for onError, and handle it there... but it's not catch-able. 🤔

@bradjones1
Copy link

Actually... I just tried this and... it works. The promise is rejected with the error, but you can also subscribe to events. Might be stale/can't recreate?

@bradjones1
Copy link

See also #306

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

3 participants