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

Missing time metrics on error #10

Open
woodenconsulting opened this issue Sep 26, 2018 · 0 comments
Open

Missing time metrics on error #10

woodenconsulting opened this issue Sep 26, 2018 · 0 comments

Comments

@woodenconsulting
Copy link

woodenconsulting commented Sep 26, 2018

Using request-promise and the time config <- (scroll down a bit), the various time metrics applied to the original request context are not accessible when an error is thrown. While they can be accessed when the promise resolves by using the resolveWithFullResponse, they are not accessible on error; a custom request error is created and thrown.

Using request directly, I can access the original context to pull this information when there is an error, see example. I don't see a way to do this with request-promise - it would seem that this information would need to be added to RequestError, StatusCodeError and TransformError respectively.

Is there something I missed that makes this information accessible on error and if not can we add those metrics to the existing errors if time is enabled?

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

1 participant