Skip to content

Commit 818af03

Browse files
authored
reject at least one promise when fetching a row group fails (#208)
1 parent 69f8d3d commit 818af03

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lib/tableProvider.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ export function parquetDataFrame(from: AsyncBufferFrom, metadata: FileMetaData):
7575
}
7676
})
7777
.catch((error: unknown) => {
78-
console.error('Error fetching row group', error)
78+
const prefix = `Error fetching row group ${groupIndex} (${rowStart}-${rowEnd}).`
79+
console.error(prefix, error)
80+
const reason = `${prefix} ${error}`
81+
// reject the index of the first row (it's enough to trigger the error bar)
82+
data[rowStart]?.index.reject(reason)
7983
})
8084
groups[groupIndex] = true
8185
}

0 commit comments

Comments
 (0)