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

Event not emitted with all errors #35

Open
hmorey3 opened this issue Jun 17, 2022 · 1 comment
Open

Event not emitted with all errors #35

hmorey3 opened this issue Jun 17, 2022 · 1 comment

Comments

@hmorey3
Copy link

hmorey3 commented Jun 17, 2022

Certain http errors are not causing the "record" event to be emitted, making my http recorder logic not run. For example, if I call a url that doesn't exist (and I would imagine timeouts). I would like to be able to record events like this for testing purposes

I believe this is because you are hooking into the node "response" event, which is probably not fired for errors in which there is no response, like timeouts. What do you think?

@gr2m
Copy link
Owner

gr2m commented Jun 17, 2022

I think having an "error" event that you could subscribe to for timeouts etc would be very helpful! If you like to dig into it I'd be happy to review a PR

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