feat: update timeout error UX (#10274)

This commit is contained in:
Erik Ritter
2020-07-20 15:32:17 -07:00
committed by GitHub
parent d92cb66f60
commit 5fa4680447
29 changed files with 557 additions and 65 deletions

View File

@@ -22,13 +22,14 @@ import { Alert, Collapse } from 'react-bootstrap';
import { t } from '@superset-ui/translation';
import getErrorMessageComponentRegistry from './getErrorMessageComponentRegistry';
import { SupersetError } from './types';
import { SupersetError, ErrorSource } from './types';
type Props = {
error?: SupersetError;
link?: string;
message?: string;
stackTrace?: string;
source?: ErrorSource;
};
export default function ErrorMessageWithStackTrace({
@@ -36,6 +37,7 @@ export default function ErrorMessageWithStackTrace({
message,
link,
stackTrace,
source,
}: Props) {
const [showStackTrace, setShowStackTrace] = useState(false);
@@ -45,7 +47,7 @@ export default function ErrorMessageWithStackTrace({
error.error_type,
);
if (ErrorMessageComponent) {
return <ErrorMessageComponent error={error} />;
return <ErrorMessageComponent error={error} source={source} />;
}
}