You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2022/06/13 20:40:34 UTC
[airavata-django-portal] branch develop updated: AIRAVATA-3627 If not found error when application interface deleted
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
The following commit(s) were added to refs/heads/develop by this push:
new 065a95f7 AIRAVATA-3627 If not found error when application interface deleted
065a95f7 is described below
commit 065a95f7105979af6ba914c65f8be4f34f548ca8
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Mon Jun 13 16:38:33 2022 -0400
AIRAVATA-3627 If not found error when application interface deleted
---
.../js/store/modules/view-experiment.js | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/store/modules/view-experiment.js b/django_airavata/apps/workspace/static/django_airavata_workspace/js/store/modules/view-experiment.js
index c28d2c74..02d7af1d 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/store/modules/view-experiment.js
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/store/modules/view-experiment.js
@@ -1,4 +1,4 @@
-import { models, services } from "django-airavata-api";
+import { errors, models, services } from "django-airavata-api";
import ExperimentState from "django-airavata-api/static/django_airavata_api/js/models/ExperimentState";
import JobState from "django-airavata-api/static/django_airavata_api/js/models/JobState";
@@ -42,12 +42,19 @@ export const actions = {
async setFullExperiment({ dispatch, commit }, { fullExperiment }) {
commit("setFullExperiment", { fullExperiment });
const appInterfaceId = fullExperiment.experiment.executionId;
- const applicationInterface = await services.ApplicationInterfaceService.retrieve(
- {
- lookup: appInterfaceId,
+ try {
+ const applicationInterface = await services.ApplicationInterfaceService.retrieve(
+ { lookup: appInterfaceId },
+ { ignoreErrors: true }
+ );
+ commit("setApplicationInterface", { applicationInterface });
+ } catch (error) {
+ // Ignore when application interface is not found; it was probably deleted
+ // But in all other cases, report the error as unhandled
+ if (!errors.ErrorUtils.isNotFoundError(error)) {
+ errors.UnhandledErrorDispatcher.reportUnhandledError(error);
}
- );
- commit("setApplicationInterface", { applicationInterface });
+ }
dispatch("initPollingExperiment");
},
setLaunching({ dispatch, commit }, { launching }) {