Business errors differenciated from technical errors in the Lambda runner

This commit is contained in:
Gaël Métais
2021-04-11 13:14:35 +01:00
parent 201bf75bf7
commit 163eef58c2
5 changed files with 45 additions and 16 deletions
+2 -1
View File
@@ -102,7 +102,8 @@ var ApiController = function(app) {
if (response.StatusCode === 200 && response.Payload && response.Payload !== 'null') {
const payload = JSON.parse(response.Payload);
if (payload.errorType) {
if (payload.status === 'failed') {
debug('Failed with error %s', payload.errorMessage);
runsDatastore.markAsFailed(run.runId, payload.errorMessage);
} else {
debug('Success!');