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

ECONNRESET during fetch #21

Open
rjborba opened this issue Mar 2, 2021 · 2 comments
Open

ECONNRESET during fetch #21

rjborba opened this issue Mar 2, 2021 · 2 comments

Comments

@rjborba
Copy link

rjborba commented Mar 2, 2021

Hi! First of all I would like to thank you for this pretty good and simple LIB.

I'm getting sometimes ECONNRESET exception due my poor network. And even if the requested code is wrapped by a try-catch block, it seems to crash my node app. I guess some actions are happening in a different thread inside the, for example, retrieve method. Would it be possible?

@Prabhakar-Poudel
Copy link
Contributor

Are you still having the issue? I know the cause and workaround, but thinking of making a PR for a better fix.
It comes from emit('error') and you are not catching the error
to fix it, you need to add on error handler in your client

Client.on('error', () => ()) for e.g.

@rjborba
Copy link
Author

rjborba commented Sep 15, 2021

It is been a while since I used the lib, but It is still good to know the way to fix it. Thanks you!

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

2 participants