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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user