From 99b26cff875a90f0f3cac27994f59351311b96ec Mon Sep 17 00:00:00 2001 From: mclarke47 Date: Thu, 8 Oct 2020 10:26:09 +0100 Subject: [PATCH] show response status code from k8s API in UI --- .../src/components/KubernetesContent/ErrorPanel.test.tsx | 2 +- .../kubernetes/src/components/KubernetesContent/ErrorPanel.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/kubernetes/src/components/KubernetesContent/ErrorPanel.test.tsx b/plugins/kubernetes/src/components/KubernetesContent/ErrorPanel.test.tsx index 6985423a10..6fa6b3114c 100644 --- a/plugins/kubernetes/src/components/KubernetesContent/ErrorPanel.test.tsx +++ b/plugins/kubernetes/src/components/KubernetesContent/ErrorPanel.test.tsx @@ -76,7 +76,7 @@ describe('ErrorPanel', () => { expect(getByText('Cluster: THIS_CLUSTER')).toBeInTheDocument(); expect( getByText( - "Error fetching Kubernetes resource: 'some/resource', error: SYSTEM_ERROR", + "Error fetching Kubernetes resource: 'some/resource', error: SYSTEM_ERROR, status code: 500", ), ).toBeInTheDocument(); }); diff --git a/plugins/kubernetes/src/components/KubernetesContent/ErrorPanel.tsx b/plugins/kubernetes/src/components/KubernetesContent/ErrorPanel.tsx index 1fe5714b09..1b8336dd72 100644 --- a/plugins/kubernetes/src/components/KubernetesContent/ErrorPanel.tsx +++ b/plugins/kubernetes/src/components/KubernetesContent/ErrorPanel.tsx @@ -29,7 +29,7 @@ const clustersWithErrorsToErrorMessage = ( {c.errors.map((e, j) => { return ( - {`Error fetching Kubernetes resource: '${e.resourcePath}', error: ${e.errorType}`} + {`Error fetching Kubernetes resource: '${e.resourcePath}', error: ${e.errorType}, status code: ${e.statusCode}`} ); })}