diff --git a/src/common/components/ErrorHandler.jsx b/src/common/components/ErrorHandler.jsx
index 57805fcc8e..50b759a947 100644
--- a/src/common/components/ErrorHandler.jsx
+++ b/src/common/components/ErrorHandler.jsx
@@ -1,4 +1,6 @@
-import { Snackbar, Alert, Button, Link, Dialog, DialogContent, DialogContentText, DialogActions, Typography } from '@mui/material';
+import {
+ Snackbar, Alert, Button, Link, Dialog, DialogContent, DialogContentText, DialogActions, Typography,
+} from '@mui/material';
import React, { useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { usePrevious } from '../../reactHelper';
@@ -27,7 +29,13 @@ const ErrorHandler = () => {
severity="error"
variant="filled"
>
- {displayMessage} | setExpanded(true)}>{t('sharedShowDetails')}
+ {displayMessage}
+ {multiline && (
+ <>
+ {' | '}
+ setExpanded(true)}>{t('sharedShowDetails')}
+ >
+ )}