fix: show meaningful error messages in database manager schema fetch (#8296)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Diego Imbert
2026-03-10 13:38:59 +01:00
committed by GitHub
parent 31fc213933
commit 932eb0dc4a

View File

@@ -16,6 +16,7 @@ import type { DBSchema, GraphqlSchema, SQLSchema } from '$lib/stores'
import { stringifyGraphqlSchema, stringifySchema } from '$lib/components/copilot/lib'
import type { DbType } from '$lib/components/dbTypes'
import { getDatabaseArg } from '$lib/components/dbOps'
import { sendUserToast } from '$lib/toast'
export async function loadTableMetaData(
input: DbInput,
@@ -95,7 +96,8 @@ export async function loadAllTablesMetaData(
return map
} catch (e) {
throw new Error('Error loading all tables metadata: ' + e)
sendUserToast('Error loading tables metadata: ' + e, 'error')
throw e
}
}