Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Capture and print error if context loading fails.

Tianzhou Cheneb8f23b476be
diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index 08bf61a09e..ca195c6cd7 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -1,6 +1,7 @@
<template>
+ <h1 v-if="error">Failed to load {{ error.stack }}</h1>
<!-- Suspense is experimental, be aware of the potential change -->
- <Suspense>
+ <Suspense v-else>
<template #default>
<div>
<ProvideContext>
@@ -15,11 +16,21 @@
</template>
<script lang="ts">
+import { ref, onErrorCaptured } from "vue";
import ProvideContext from "./components/ProvideContext.vue";
export default {
name: "App",
components: { ProvideContext },
- setup(props, ctx) {},
+ setup(props, ctx) {
+ const error = ref();
+
+ onErrorCaptured((e) => {
+ error.value = e;
+ return true;
+ });
+
+ return { error };
+ },
};
</script>