Error type fixes
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2021-10-18 13:03:28 -05:00
parent 8d1dcc87fb
commit 9ee4c42e43
7 changed files with 47 additions and 20 deletions

View File

@@ -63,10 +63,12 @@ export class PostgresConnection extends Connection {
rowCount: result.rowCount,
}
} catch (e) {
throw this.app().errorWrapContext(e, {
query,
connection: this.name,
})
if ( e instanceof Error ) {
throw this.app().errorWrapContext(e, {
query,
connection: this.name,
})
}
}
}