diff --git a/js/apps/admin-ui/src/components/error/ErrorRenderer.tsx b/js/apps/admin-ui/src/components/error/ErrorRenderer.tsx index 0cfe955471..cf80e1972e 100644 --- a/js/apps/admin-ui/src/components/error/ErrorRenderer.tsx +++ b/js/apps/admin-ui/src/components/error/ErrorRenderer.tsx @@ -1,3 +1,7 @@ +import { + useErrorBoundary, + type FallbackProps, +} from "@keycloak/keycloak-ui-shared"; import { Alert, AlertActionCloseButton, @@ -7,10 +11,9 @@ import { } from "@patternfly/react-core"; import { useTranslation } from "react-i18next"; -import { type FallbackProps } from "@keycloak/keycloak-ui-shared"; - export const ErrorRenderer = ({ error }: FallbackProps) => { const { t } = useTranslation(); + const { showBoundary } = useErrorBoundary(); const reset = () => { window.location.href = window.location.origin + window.location.pathname; @@ -26,7 +29,9 @@ export const ErrorRenderer = ({ error }: FallbackProps) => { } actionLinks={ - {t("retry")} + showBoundary()}> + {t("retry")} + } > diff --git a/js/libs/ui-shared/src/utils/useFetch.ts b/js/libs/ui-shared/src/utils/useFetch.ts index 09419d44f1..89f4eaecf0 100644 --- a/js/libs/ui-shared/src/utils/useFetch.ts +++ b/js/libs/ui-shared/src/utils/useFetch.ts @@ -26,7 +26,6 @@ export function useFetch( useEffect(() => { const controller = new AbortController(); const { signal } = controller; - showBoundary(); adminClientCall() .then((result) => { if (!signal.aborted) {