mirror of
https://github.com/apache/superset.git
synced 2026-08-04 04:52:32 +00:00
chore(native-filters): Ensure consistent error handling (#24206)
Co-authored-by: Michael S. Molina <michael.s.molina@gmail.com>
This commit is contained in:
@@ -34,6 +34,7 @@ type Props = {
|
||||
source?: ErrorSource;
|
||||
description?: string;
|
||||
errorMitigationFunction?: () => void;
|
||||
fallback?: React.ReactNode;
|
||||
};
|
||||
|
||||
export default function ErrorMessageWithStackTrace({
|
||||
@@ -45,6 +46,7 @@ export default function ErrorMessageWithStackTrace({
|
||||
stackTrace,
|
||||
source,
|
||||
description,
|
||||
fallback,
|
||||
}: Props) {
|
||||
// Check if a custom error message component was registered for this message
|
||||
if (error) {
|
||||
@@ -62,6 +64,10 @@ export default function ErrorMessageWithStackTrace({
|
||||
}
|
||||
}
|
||||
|
||||
if (fallback) {
|
||||
return <>{fallback}</>;
|
||||
}
|
||||
|
||||
return (
|
||||
<ErrorAlert
|
||||
level="warning"
|
||||
|
||||
Reference in New Issue
Block a user