Open
Description
I have an error flow which sends a 400 response, effectively handling the error, after which I'd like to terminate.
If I set handleError to true the next activity will continue. If I propagate the error my init code will detect it and pass it to my default express error handler which will attempt to send a 500.
function(req, res, next) {
workflow({ req: req, res: res }, function(err) {
if (err) return next(err)
})
}
My workaround is to decorate the error with a handled property and use this in my init code, i.e.
function(req, res, next) {
workflow({ req: req, res: res }, function(err) {
if (err && !err.handled) return next(err)
})
}
however it would be nice if activities had an explicit break
clause
Metadata
Metadata
Assignees
Labels
No labels