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

sendWithUs.send Does not call callback when there is a network error #58

Closed
neil176 opened this issue Jan 14, 2022 · 2 comments
Closed

Comments

@neil176
Copy link

neil176 commented Jan 14, 2022

Client version

5.1.0

Expected behaviour

The callback passed to sendWithUs.send(data, callback) should always be called

Actual behaviour

The callback is not called when there is an error that prevents any response from the server (such as ETIMEDOUT)

Steps to reproduce

Induce a network error in the request flow.

Recommendation

A .catch(err => callback(err) or similar should be added to:

https://github.com/sendwithus/sendwithus_nodejs/blob/master/lib/sendwithus.js#L150-L154

@rob-swu
Copy link
Contributor

rob-swu commented Feb 7, 2022

Thanks for bringing this to our attention. We will add this within the next two weeks, I'll link back to the issue with the PR when it's available

@rob-swu
Copy link
Contributor

rob-swu commented Feb 16, 2022

this has been covered in the 6.0.0 release done in PR #61

@rob-swu rob-swu closed this as completed Feb 16, 2022
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