Display exception stack trace w/ 1 call per line in ds webapp

This commit is contained in:
John Colvin committed 2024-07-30 18:26:58 +00:00
1 parent fc86a505ee
commit d07eff613f
1 file changed
+4 -3
@@ -22,9 +22,10 @@ const QueryStatusView = ({ queryState, details, error }) => {
headerContent = error.message;
detailElements.push(<Typography variant="body1">{error.data.error_message}</Typography>);
detailElements.push(<Typography variant="subtitle1">Stack Trace:</Typography>);
detailElements.push(<Typography variant="body2" component="pre" sx={{ whiteSpace: 'pre-wrap' }}>
{error.data.stack_trace}
</Typography>);
(error.data.stack_trace ?? []).forEach(line => detailElements.push(
<Typography variant="body2" component="pre" sx={{ whiteSpace: 'pre-wrap' }}>
{line}
</Typography>));
} else if (details != null) {
detailElements.push(<Typography variant="body1">{details}</Typography>);
}