Skip to content

Commit

Permalink
absent concept set exception is handled now (OHDSI/WebAPI#1897)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssuvorov-fls committed Jun 11, 2021
1 parent 48090bb commit 5a021e5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
6 changes: 4 additions & 2 deletions js/components/analysisExecution/analysis-execution-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,10 @@ define([
}
executionGroup.status(this.executionStatuses.PENDING);
const data = await this.ExecutionService.generate(this.analysisId(), sourceKey);
JobDetailsService.createJob(data);
this.loadData({ silently: true });
if (data) {
JobDetailsService.createJob(data);
this.loadData({silently: true});
}
} catch(err) {
console.error(err);
this.setExecutionGroupStatus(executionGroup);
Expand Down
7 changes: 6 additions & 1 deletion js/services/Estimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ define(function (require, exports) {
function generate(id, source) {
return httpService.doPost(config.webAPIRoot + estimationEndpoint + id + '/generation/' + source)
.then(res => res.data)
.catch(error => authApi.handleAccessDenied(error));
.catch(error => {
authApi.handleAccessDenied(error);
if (error.status == 400) {
alert((error && error.data && error.data.payload && error.data.payload.message) ? error.data.payload.message : 'Error occurred during analysis generion');
}
});
}

function listExecutions(id) {
Expand Down
7 changes: 6 additions & 1 deletion js/services/Prediction.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ define(function (require, exports) {
function generate(id, source) {
return httpService.doPost(config.webAPIRoot + predictionEndpoint + id + '/generation/' + source)
.then(res => res.data)
.catch(error => authApi.handleAccessDenied(error));
.catch(error => {
authApi.handleAccessDenied(error);
if (error.status == 400) {
alert((error && error.data && error.data.payload && error.data.payload.message) ? error.data.payload.message : 'Error occurred during analysis generion');
}
});
}

function listExecutions(id) {
Expand Down

0 comments on commit 5a021e5

Please sign in to comment.