Skip to content

Commit 2e1c02d

Browse files
committed
fix (invoke-handler) invalid error thrown when model not found
1 parent 17ed9bb commit 2e1c02d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/server-code/runners/tasks/executor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ executor.execute = function(task, runnerOpts, model) {
9696
.then((taskExecutor) => taskExecutor(task, runnerOpts, model))
9797
.then(result => result && invocationResult(null, result))
9898
.catch((err) => {
99-
logger.error(err);
99+
logger.error(`Error: ${err.message || err}`);
100+
100101
return invocationResult(err);
101102
});
102103
};

lib/server-code/runners/tasks/invoke-handler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function buildModel(task, runnerOpts) {
111111
const modelDescriptorPath = `${codePath}/model.json`;
112112

113113
if (!fs.existsSync(modelDescriptorPath)) {
114-
logger.error(`Application Model descriptor not found (${modelDescriptorPath})`);
114+
throw new Error(`Application Model descriptor not found [${modelDescriptorPath}]`);
115115
}
116116

117117
const modelDescriptor = require(modelDescriptorPath);

0 commit comments

Comments
 (0)