Skip to content

Commit

Permalink
Don't swallow errors when resolving arguments (elastic#648)
Browse files Browse the repository at this point in the history
Fixes https://github.com/elastic/kibana-canvas/issues/278.

This PR simply bubbles up errors that come as a result of attempting to resolve the argument subexpressions.
  • Loading branch information
lukasolson authored and w33ble committed Jun 7, 2018
1 parent a59f04e commit 104de53
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common/interpreter/interpret.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export function interpretProvider(config) {
return argAsts.map(argAst => {
return async (ctx = context) => {
const newContext = await interpret(argAst, ctx);
if (getType(newContext) === 'error') throw newContext.error;
return cast(newContext, argDefs[argName].types);
};
});
Expand Down

0 comments on commit 104de53

Please sign in to comment.