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
I'm trying to attach a logger to the context so that I can log certain messages before a retry of a request is performed. The context key in the options to got looks like this: { context: logger }
Actual behavior
The hook beforeRetry is not getting the context from the options passed into it. options.context is {}.
...
Expected behavior
I expect the beforeRetry hook to have the context object in the options.context parameter of its functions to be the same value which I passed in: { context: logger }.
...
I changed the hook to a beforeRequest and the context was passed through successfully.
Describe the bug
I'm trying to attach a
logger
to thecontext
so that I can log certain messages before a retry of a request is performed. Thecontext
key in theoptions
togot
looks like this:{ context: logger }
Actual behavior
The hook
beforeRetry
is not getting thecontext
from theoptions
passed into it.options.context
is{}
....
Expected behavior
I expect the
beforeRetry
hook to have thecontext
object in theoptions.context
parameter of its functions to be the same value which I passed in:{ context: logger }
....
I changed the hook to a
beforeRequest
and the context was passed through successfully.Code to reproduce for failure
Using
beforeRequest
hook workedChecklist
The text was updated successfully, but these errors were encountered: