try...catch around functionWithCallbackWorkflow so it doesn't mess with your logic
var functionWithCallbackWorkflow = function(arg1, arg2, cb) { | |
try { | |
// DO STUFF, generating res | |
} catch (ex) { | |
return cb(ex); | |
} | |
cb(null, res); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment