diff --git a/src/common/components/InlineError.tsx b/src/common/components/InlineError.tsx index 64d83c38b..b4fa68f35 100644 --- a/src/common/components/InlineError.tsx +++ b/src/common/components/InlineError.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; +import type { SxProps } from '@mui/joy/styles/types'; import { Alert, Typography } from '@mui/joy'; -import { SxProps } from '@mui/joy/styles/types'; -export function InlineError(props: { error: React.JSX.Element | null | any, severity?: 'warning' | 'danger' | 'info', sx?: SxProps }) { +export function InlineError(props: { error: Error | React.JSX.Element | null | any, severity?: 'warning' | 'danger' | 'info', sx?: SxProps }) { const color = props.severity === 'info' ? 'primary' : props.severity || 'warning'; return ( diff --git a/src/modules/blocks/code/RenderCode.tsx b/src/modules/blocks/code/RenderCode.tsx index fd8b827da..59d46e33d 100644 --- a/src/modules/blocks/code/RenderCode.tsx +++ b/src/modules/blocks/code/RenderCode.tsx @@ -214,7 +214,7 @@ function RenderCodeImpl(props: RenderCodeImplProps) { renderSVG ? (patchSvgString(fitScreen, blockCode) || 'No SVG code') : renderPlantUML - ? (patchSvgString(fitScreen, plantUmlHtmlData) || (plantUmlError as string) || 'No PlantUML rendering.') + ? (patchSvgString(fitScreen, plantUmlHtmlData) || (plantUmlError ? `PlantUML Error: ${plantUmlError.message}` : 'No PlantUML code')) : highlightedCode, }} sx={{