From aa5277de2e2c7b29c481d1b5d53850595fe0f7eb Mon Sep 17 00:00:00 2001 From: cong meng Date: Thu, 10 Dec 2020 13:58:10 +1300 Subject: [PATCH] fix(frontend): cannnot access configuration details view containing binary data (#4503) (#4561) Co-authored-by: Simon Meng --- app/kubernetes/services/configMapService.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/kubernetes/services/configMapService.js b/app/kubernetes/services/configMapService.js index 247af7497..be863eaeb 100644 --- a/app/kubernetes/services/configMapService.js +++ b/app/kubernetes/services/configMapService.js @@ -24,8 +24,11 @@ class KubernetesConfigMapService { try { const params = new KubernetesCommonParams(); params.id = name; - const [raw, yaml] = await Promise.all([this.KubernetesConfigMaps(namespace).get(params).$promise, this.KubernetesConfigMaps(namespace).getYaml(params).$promise]); - const configMap = KubernetesConfigMapConverter.apiToConfigMap(raw, yaml); + const [rawPromise, yamlPromise] = await Promise.allSettled([ + this.KubernetesConfigMaps(namespace).get(params).$promise, + this.KubernetesConfigMaps(namespace).getYaml(params).$promise, + ]); + const configMap = KubernetesConfigMapConverter.apiToConfigMap(rawPromise.value, yamlPromise.value); return configMap; } catch (err) { if (err.status === 404) {