You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using request-promise and the timeconfig <- (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?
The text was updated successfully, but these errors were encountered:
Using
request-promise
and thetime
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 theresolveWithFullResponse
, 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 toRequestError
,StatusCodeError
andTransformError
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?The text was updated successfully, but these errors were encountered: