Merge pull request #30057 from backstage/rugvip/errors

catalog-client: fix error responses
This commit is contained in:
Patrik Oldsberg
2025-06-01 01:01:01 +02:00
committed by GitHub
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/catalog-client': patch
---
Fixed `CatalogClient` error responses for `refreshEntity` and `addLocation`.
+2 -2
View File
@@ -305,7 +305,7 @@ export class CatalogClient implements CatalogApi {
);
if (response.status !== 200) {
throw new Error(await response.text());
throw await ResponseError.fromResponse(response);
}
}
@@ -345,7 +345,7 @@ export class CatalogClient implements CatalogApi {
);
if (response.status !== 201) {
throw new Error(await response.text());
throw await ResponseError.fromResponse(response);
}
const { location, entities, exists } = await response.json();