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

Timeout causes unhandled exception to be thrown #13

Closed
phawxby opened this issue Mar 10, 2023 · 4 comments · Fixed by #14
Closed

Timeout causes unhandled exception to be thrown #13

phawxby opened this issue Mar 10, 2023 · 4 comments · Fixed by #14

Comments

@phawxby
Copy link
Contributor

phawxby commented Mar 10, 2023

this.axiosClient.post('/log/v1', {
timestamp: Date.now(),
message: info[MESSAGE],
logtype: info[LEVEL]
});

As the call to NewRelic is an async operation that is not awaited or handled in a callback if the request times out then an unhandled error is thrown. It would also be good if it were possible to increase the timeout or supply additional options.

@joaolrpaulo
Copy link
Owner

Hello @phawxby, are you able to create a Pull Request for this improvement? 🙏🏼

@phawxby
Copy link
Contributor Author

phawxby commented Mar 10, 2023

Hello @phawxby, are you able to create a Pull Request for this improvement? 🙏🏼

I'll quickly throw something together now. I'm having to do some research because as noted here it's a secret how the callback is supposed to be used. So I'm basically going to copy this.

@joaolrpaulo
Copy link
Owner

Version 1.1.0 published

@phawxby
Copy link
Contributor Author

phawxby commented Mar 13, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants