Improve display of errors

This commit is contained in:
Adam Harvey
2021-02-02 23:27:20 -05:00
parent a06f9974f5
commit 5479e4eef0
4 changed files with 21 additions and 15 deletions
@@ -27,6 +27,7 @@ import {
TableFilter,
TableState,
useQueryParamState,
WarningPanel,
} from '@backstage/core';
import {
EntityRefLink,
@@ -35,7 +36,6 @@ import {
getEntityRelations,
} from '@backstage/plugin-catalog-react';
import { Chip } from '@material-ui/core';
import { Alert } from '@material-ui/lab';
import React from 'react';
import { ApiTypeTitle } from '../ApiDefinitionCard';
@@ -151,11 +151,9 @@ export const ApiExplorerTable = ({
if (error) {
return (
<div>
<Alert severity="error">
Error encountered while fetching catalog entities. {error.toString()}
</Alert>
</div>
<WarningPanel severity="error" title="Could not fetch catalog entities.">
{error.toString()}
</WarningPanel>
);
}