There was an error while loading. Please reload this page.
1 parent ec056a4 commit bb37106Copy full SHA for bb37106
1 file changed
src/duckdb/src/table/duckdb-table-utils.ts
@@ -48,7 +48,7 @@ export async function getDuckDBColumnTypes(
48
type: columnTypes?.get(i)
49
});
50
}
51
- } catch (error) {
+ } catch (primaryError) {
52
try {
53
const resDescribe = await connection.query(`DESCRIBE ${quotedTableName}`);
54
const numRows = resDescribe.numRows;
@@ -62,11 +62,14 @@ export async function getDuckDBColumnTypes(
62
63
64
} catch (fallbackError) {
65
- console.warn(
66
- '[DuckDB] Failed to load column types for',
67
- tableName,
68
- fallbackError
+ const error = new Error(
+ `[DuckDB] Failed to load column types for ${tableName} (PRAGMA + DESCRIBE).`
69
);
+ (error as Error & {cause?: unknown}).cause = {
+ primaryError,
70
+ fallbackError
71
+ };
72
+ throw error;
73
74
75
0 commit comments