Skip to content

Commit 358f683

Browse files
committed
chore(lib/columns): show error for all invalid cols
1 parent dc86a6e commit 358f683

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/lib/PostgresMetaColumns.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,12 @@ export default class PostgresMetaColumns {
9999
if (ids && ids.length > 0) {
100100
const regexp = /^(\d+)\.(\d+)$/
101101

102-
const invalidId = ids.find((id) => !regexp.test(id))
103-
if (invalidId) {
104-
return { data: null, error: { message: `Invalid format for column ID: ${invalidId}` } }
102+
const invalidIds = ids.filter((id) => !regexp.test(id))
103+
if (invalidIds.length > 0) {
104+
return {
105+
data: null,
106+
error: { message: `Invalid format for column IDs: ${invalidIds.join(', ')}` },
107+
}
105108
}
106109

107110
const filteringClauses = ids

0 commit comments

Comments
 (0)