Vue Router
useRouterErrorBoundary() (vue-error-boundary-kit/router) — the vue-router-only equivalent of useNuxtErrorBoundary(). router.onError() is vue-router's own catch-all: it fires for errors thrown in navigation guards, errors passed to next(), and errors raised while resolving an async route component (component: () => import(...)) — none of which happen inside a component's render/setup lifecycle, so onErrorCaptured/<ErrorBoundary> structurally never sees them.
import { useRouterErrorBoundary } from 'vue-error-boundary-kit/router'<!-- App.vue -->
<script setup lang="ts">
const { error } = useRouterErrorBoundary({ reporter: sentryReporter })
</script>Same options as useErrorBoundary() (onError, beforeReset, reporter, reportContext, internalErrorPrefix); unsubscribes from router.onError() automatically on scope dispose. vue-router is an optional peer dependency, never bundled unless you import this entry point. Verified against a real router.onError() — both a throwing navigation guard and a rejected async route component were confirmed to actually reach it, against vue-router@5.2.0; the declared peerDependencies range (^4.0.0 || ^5.0.0) is reasoned from onError's stable, long-standing signature rather than independently re-verified against 4.x.