show response status code from k8s API in UI

This commit is contained in:
mclarke47
2020-10-08 10:26:09 +01:00
parent 78e7202b19
commit 99b26cff87
2 changed files with 2 additions and 2 deletions
@@ -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();
});
@@ -29,7 +29,7 @@ const clustersWithErrorsToErrorMessage = (
{c.errors.map((e, j) => {
return (
<Typography variant="body2" key={j}>
{`Error fetching Kubernetes resource: '${e.resourcePath}', error: ${e.errorType}`}
{`Error fetching Kubernetes resource: '${e.resourcePath}', error: ${e.errorType}, status code: ${e.statusCode}`}
</Typography>
);
})}