catalog-client: fix error responses

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2025-05-27 00:07:37 +02:00
parent affc953b1b
commit 22fad0d451
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();