From 436a07fdb3bcb09d91aa3a4835fff65c66d19e66 Mon Sep 17 00:00:00 2001 From: Tejas Kumar Date: Wed, 19 May 2021 15:13:25 +0200 Subject: [PATCH 1/2] 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); } }, From ca6e0ab6987cc66eea6112ae1cd1f09dedf17b36 Mon Sep 17 00:00:00 2001 From: Tejas Kumar Date: Wed, 19 May 2021 15:19:23 +0200 Subject: [PATCH 2/2] Add changeset Signed-off-by: Tejas Kumar --- .changeset/nasty-zebras-worry.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/nasty-zebras-worry.md diff --git a/.changeset/nasty-zebras-worry.md b/.changeset/nasty-zebras-worry.md new file mode 100644 index 0000000000..18c5bc0416 --- /dev/null +++ b/.changeset/nasty-zebras-worry.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-import': patch +--- + +Make UI errors friendlier when importing existing components