From dabbafb9b33074ee07db131fda60f5f9a3d0e78e Mon Sep 17 00:00:00 2001 From: Chris Berry Date: Mon, 16 Oct 2017 18:35:18 -0700 Subject: [PATCH] fix(core): catch exceptions on server group source when pipeline 404s (#4275) --- .../modules/core/src/diffs/viewChangesLink.component.ts | 3 ++- .../modules/core/src/entityTag/entitySource.component.ts | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/scripts/modules/core/src/diffs/viewChangesLink.component.ts b/app/scripts/modules/core/src/diffs/viewChangesLink.component.ts index b8d3769209f..7f030aabd12 100644 --- a/app/scripts/modules/core/src/diffs/viewChangesLink.component.ts +++ b/app/scripts/modules/core/src/diffs/viewChangesLink.component.ts @@ -97,7 +97,8 @@ class ViewChangesLinkController implements IController { // if the stage is still running, and we haven't found commits or changes, reload it on the next refresh cycle this.executionLoaded = stage.status !== 'RUNNING' || this.changesAvailable; - }).finally(() => this.loadingExecution = false); + }).catch(() => {}) + .finally(() => this.loadingExecution = false); } public $onInit(): void { diff --git a/app/scripts/modules/core/src/entityTag/entitySource.component.ts b/app/scripts/modules/core/src/entityTag/entitySource.component.ts index 57c66eb44aa..75cf913370c 100644 --- a/app/scripts/modules/core/src/entityTag/entitySource.component.ts +++ b/app/scripts/modules/core/src/entityTag/entitySource.component.ts @@ -31,9 +31,9 @@ class EntitySourceCtrl implements IController { this.executionType = 'Pipeline'; this.loadingExecution = true; this.executionService.getExecution(this.metadata.value.executionId).then( - (execution: IExecution) => this.execution = execution, - () => this.executionNotFound = true - ).finally(() => this.loadingExecution = false); + (execution: IExecution) => this.execution = execution + ).catch(() => this.executionNotFound = true) + .finally(() => this.loadingExecution = false); } }