diff --git a/src/components/services/widget/error.jsx b/src/components/services/widget/error.jsx index 81423b3f2..76e42239a 100644 --- a/src/components/services/widget/error.jsx +++ b/src/components/services/widget/error.jsx @@ -12,6 +12,10 @@ function displayData(data) { export default function Error({ error }) { const { t } = useTranslation(); + if (typeof error === "string") { + error = { message: error }; // eslint-disable-line no-param-reassign + } + if (error?.data?.error) { error = error.data.error; // eslint-disable-line no-param-reassign }