Skip to content

Commit

Permalink
fix: invoke error output (#610)
Browse files Browse the repository at this point in the history
  • Loading branch information
echosoar committed Aug 19, 2020
1 parent 73432bb commit 9724f4a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/faas-cli-plugin-invoke/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -569,16 +569,14 @@ export class FaaSInvokePlugin extends BasePlugin {
});
}
} catch (e) {
this.core.debug('Call Error', e);
if (resultType !== 'store') {
const errorLog = this.core.cli.error || this.core.cli.log;
errorLog(e && e.message ? `[Error] ${e.message}` : e);
} else {
if (resultType === 'store') {
this.setStore('result', {
success: false,
err: e,
});
}
const errorLog = this.core.cli.error || this.core.cli.log;
errorLog(e && e.message ? `[Error] ${e.message}` : e);
}
}

Expand Down

0 comments on commit 9724f4a

Please sign in to comment.