diff --git a/src/charts/SimplePowerBIReportEmbed/SimplePowerBIReportEmbed.js b/src/charts/SimplePowerBIReportEmbed/SimplePowerBIReportEmbed.js index 7a45149b..e9d6c0f0 100644 --- a/src/charts/SimplePowerBIReportEmbed/SimplePowerBIReportEmbed.js +++ b/src/charts/SimplePowerBIReportEmbed/SimplePowerBIReportEmbed.js @@ -10,17 +10,6 @@ import { PowerBIUtils } from '@cosmotech/azure'; import { FadingTooltip } from '../../misc'; import DashboardPlaceholder from '../Dashboard/components'; -const StyledErrorContainerDiv = styled('div')(({ theme }) => ({ - 'z-index': '1', // Need z-index > 0, otherwise the error banner is hidden behind the powerbi loading screen - height: '50px', - width: '100%', - position: 'absolute', - textAlign: 'center', - padding: '5px 0', - backgroundColor: theme.palette.error.main, - color: theme.palette.error.contrastText, -})); - const PREFIX = 'SimplePowerBIReportEmbed'; const classes = { report: `${PREFIX}-report` }; @@ -31,15 +20,6 @@ const Root = styled('div')(({ theme }) => ({ }, })); -function getErrorCode(labels, reports) { - if (!reports?.error?.status && !reports?.error?.statusText) return labels.errors.unknown; - return `${reports?.error?.status ?? ''} ${reports?.error?.statusText ?? ''}`; -} - -function getErrorDescription(labels, reports) { - return reports?.error?.powerBIErrorInfo ?? labels.errors.details; -} - function addDynamicParameters(pageName, lang, newConfig, settings, staticFilters, additionalFilters) { if (pageName !== undefined && pageName[lang] !== undefined) { newConfig.pageName = pageName[lang]; @@ -189,9 +169,6 @@ export const SimplePowerBIReportEmbed = ({ } }, [theme, report]); - const errorCode = getErrorCode(labels, reports); - const errorDescription = getErrorDescription(labels, reports); - const refreshReport = useCallback( (triggerTimeout = true) => { if (!report) return; @@ -246,10 +223,6 @@ export const SimplePowerBIReportEmbed = ({ return ( - {placeholder}
{refreshable && (