From 0dc2f2e18a5fc2e7ced2e11b502ce164112edb7a Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 13 Aug 2024 00:07:16 -0700 Subject: [PATCH] Fix error simple string --- src/components/services/widget/error.jsx | 4 ++++ 1 file changed, 4 insertions(+) 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 }