Skip to content

Commit 760b519

Browse files
authored
Fix edit PR (#1224)
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
1 parent bd96bfc commit 760b519

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-bulk-import-backend': patch
3+
---
4+
5+
Fixes `/imports` endpoint unable to edit `catalog-info.yaml` PR

workspaces/bulk-import/plugins/bulk-import-backend/src/catalog/catalogHttpClient.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,12 @@ export class CatalogHttpClient {
286286
},
287287
);
288288
} catch (error: any) {
289-
if (!error.message?.includes('ConflictError')) {
289+
if (
290+
!(
291+
error.message?.includes('ConflictError') ||
292+
error.body?.error?.name?.includes('ConflictError')
293+
)
294+
) {
290295
throw error;
291296
}
292297
// Location already exists, which is fine

0 commit comments

Comments
 (0)