diff --git a/packages/core/lib/session.js b/packages/core/lib/session.js index e150e209f..d420d213d 100644 --- a/packages/core/lib/session.js +++ b/packages/core/lib/session.js @@ -155,7 +155,7 @@ session = function(args, options = {}) { })); } catch (error1) { err = error1; - reject(err); + return reject(err); } // Load action from registry if (action.metadata.namespace) { diff --git a/packages/core/src/session.coffee b/packages/core/src/session.coffee index 44c8f2b6f..7a95c6199 100644 --- a/packages/core/src/session.coffee +++ b/packages/core/src/session.coffee @@ -89,7 +89,7 @@ session = (args, options={}) -> args: action hooks: action.hooks?.on_normalize or action.on_normalize handler: normalize - catch err then reject err + catch err then return reject err # Load action from registry if action.metadata.namespace action_from_registry = await action.registry.get action.metadata.namespace