Address review feedback from PR #33140

- Keep explicit error when API context provider exists but v1 is not
  available, only return empty holder when there is no provider at all
- Update tests in core-app-api to expect the new error message when
  rendering outside a provider
- Add @backstage/core-plugin-api to changeset since it re-exports
  useApiHolder

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2026-03-05 13:32:15 +01:00
parent fe848e09e6
commit d7311c8bac
3 changed files with 20 additions and 7 deletions
+1
View File
@@ -1,5 +1,6 @@
---
'@backstage/frontend-plugin-api': patch
'@backstage/core-plugin-api': patch
---
Changed `useApiHolder` to return an empty `ApiHolder` instead of throwing when used outside of an API context.