fix(query): show timeout settings for structured errors

This commit is contained in:
zipg authored and GitHub committed 2026-08-13 12:57:29 +08:00
1 parent c51abd2178
commit 0f86614679
5 files changed
+67 -4

No files matched your search

@@ -2,10 +2,12 @@
import { Bot, Wrench } from "@lucide/vue";
import { useI18n } from "vue-i18n";
import { Button } from "@/components/ui/button";
import type { BackendError } from "@/lib/backend/errorUtils";
import { isQueryTimeoutErrorMessage } from "@/lib/sql/queryError";
const props = defineProps<{
errorMessage: string;
backendError?: BackendError;
connectionId?: string;
}>();
@@ -18,7 +20,7 @@ const { t } = useI18n();
</script>
<template>
<Button v-if="connectionId && isQueryTimeoutErrorMessage(errorMessage)" variant="outline" size="sm" class="h-7 gap-1.5 px-2.5 text-xs" @click="emit('changeQueryTimeout')">
<Button v-if="connectionId && isQueryTimeoutErrorMessage(errorMessage, backendError)" variant="outline" size="sm" class="h-7 gap-1.5 px-2.5 text-xs" @click="emit('changeQueryTimeout')">
<Wrench class="h-3.5 w-3.5" />
{{ t("editor.changeQueryTimeout") }}
</Button>