OptionalfnThe callback to call if the original function causes an exception, even if you supply a callback the original exception will still be thrown
OptionalhkThe callback to call if the hook function causes an exception
Optionalns[Optional] Namespace details (same as the namespace used for events), useful for debugging and testing to identify the source of the instrumented hooks
OptionalreqThe hook callback to call before the original function is called
OptionalrspThe hook callback to call after the original function was called
The callbacks to call for the instrumented function, you must provide at least the request and/or response callbacks, both are not required. You must always supply the error callback