type checking callback in CallResponder.apiCall
Opened this issue · 0 comments
nptravis commented
Version
1.5.3
Module (core, cmpapi, cli, stub, or testing)
cmpapi
Describe with reproduction steps – What is the expected behavior?
We have been logging many errors due to the callback in CallResponder.apiCall
not being a function. I assume this is one of our vendors misusing the cmpapi by passing in an invlaid callback. I assume this could also be happening to others, therefore would like to propose this fix. I would rather have the more descriptive throw new Error('invalid callback function');
handle this.
Here is the PR:
#394