Skip to content

Commit

Permalink
#39 Handle analyzer launch fail
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Jul 28, 2017
1 parent 390bcda commit 6f1c03c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ui/app/scripts/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ angular.module('cortex')
_.each(response, function(resp) {
NotificationService.success(resp.data.analyzerId + ' started successfully on ' + (resp.data.artifact.data || resp.data.artifact.attributes.filename));
});
}).catch(function(err) {
if(err != 'cancel') {
NotificationService.error(('An error occurred: ' + err.statusText) || 'An unexpected error occurred');
}
});
});
};
Expand Down Expand Up @@ -83,6 +87,10 @@ angular.module('cortex')
}).then(function (response) {
$state.go('jobs');
NotificationService.success(response.data.analyzerId + ' started successfully on ' + response.data.artifact.data);
}).catch(function(err) {
if(err != 'cancel') {
NotificationService.error(('An error occurred: ' + err.statusText) || 'An unexpected error occurred');
}
});
};

Expand Down

0 comments on commit 6f1c03c

Please sign in to comment.