Skip to content

Commit e3ace38

Browse files
authored
Prevent obscuring errors when querying pg_catalog (porsager#204)
* Prevent obscuring errors when querying pg_catalog * Default origin to error stack
1 parent 779771a commit e3ace38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ function Postgres(a, b) {
241241
function fetchArrayTypes(connection) {
242242
return arrayTypesPromise || (arrayTypesPromise =
243243
new Promise((resolve, reject) => {
244-
send(connection, { resolve, reject, raw: true, prepare: false }, `
244+
send(connection, { resolve, reject, raw: true, prepare: false, origin: new Error().stack }, `
245245
select b.oid, b.typarray
246246
from pg_catalog.pg_type a
247247
left join pg_catalog.pg_type b on b.oid = a.typelem

0 commit comments

Comments
 (0)