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
Is your feature request related to a problem? Please describe.
A good usage of invokeBefore is validations, but it's hard to do it, since I can't stop the functions from running by invoking a function or returning a specific value
Describe the solution you'd like
A callback passed to invokeBefore, that when invoked it stops the function from going to the original method.
invokeBeforeCreateUser(name,next){if(!name){// this should throw an error, stops the hook from going to the target method. next(newError('please enter your name'))}// this should pass the control to the target methodnext()}
Describe alternatives you've considered
None Additional context
None
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
A good usage of
invokeBefore
is validations, but it's hard to do it, since I can't stop the functions from running by invoking a function or returning a specific valueDescribe the solution you'd like
A callback passed to
invokeBefore
, that when invoked it stops the function from going to the original method.Describe alternatives you've considered
None
Additional context
None
The text was updated successfully, but these errors were encountered: