From 436a07fdb3bcb09d91aa3a4835fff65c66d19e66 Mon Sep 17 00:00:00 2001 From: Tejas Kumar Date: Wed, 19 May 2021 15:13:25 +0200 Subject: [PATCH] Adjust rendering of backend errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fredrik Adelöw Signed-off-by: Tejas Kumar --- .../src/components/StepInitAnalyzeUrl/StepInitAnalyzeUrl.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/catalog-import/src/components/StepInitAnalyzeUrl/StepInitAnalyzeUrl.tsx b/plugins/catalog-import/src/components/StepInitAnalyzeUrl/StepInitAnalyzeUrl.tsx index 49bd776db5..09f6230fdc 100644 --- a/plugins/catalog-import/src/components/StepInitAnalyzeUrl/StepInitAnalyzeUrl.tsx +++ b/plugins/catalog-import/src/components/StepInitAnalyzeUrl/StepInitAnalyzeUrl.tsx @@ -108,7 +108,7 @@ export const StepInitAnalyzeUrl = ({ } } } catch (e) { - setError(e.message); + setError(e.data?.error?.message ?? e.message); setSubmitted(false); } },