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

Unhandled errors in promises #47

Open
BobFrankston opened this issue Jul 24, 2022 · 6 comments
Open

Unhandled errors in promises #47

BobFrankston opened this issue Jul 24, 2022 · 6 comments

Comments

@BobFrankston
Copy link

I'm getting fatal errors because of unhandled failures in promises.

@samuraitruong
Copy link
Owner

hi @BobFrankston can you share your connection code? maybe your device is new model and this code was not updated for awhile

@BobFrankston
Copy link
Author

It shouldn't matter what the device is doing, your code needs to handle errors in promises because Node will terminate the app when there is such an error.

@BobFrankston
Copy link
Author

BobFrankston commented Aug 10, 2022

I just upgraded from 1.0.5 to 1.1.0. I will see if it fixes the problem.

@BobFrankston
Copy link
Author

I've upgraded, but I still get

2022-08-12 13:28:08.832 [fail] Error: connect ECONNREFUSED 172.20.0.245:55443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1247:16)
    at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17)

I presume there is a missing error handler in the TCP connection.

@BobFrankston
Copy link
Author

Could be my error -- I just added (.on('error"). to the connection and it seems to have fixed it.

@samuraitruong
Copy link
Owner

samuraitruong commented Aug 13, 2022 via email

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