You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are using a connection pool with node 16 using pool.promises.query will cause the server to crash due to an unhandled error. It looks like this is caused by the promise error handler not satisfying the pool's event emitter. If you add pool.on("error", () => {}) it solves the issue. This works as a workaround but should be unnecessary
As a side note promises get rejected with an array, not an Error, on reader.js line 148 this results in a warning when replacing native promises with bluebird. See the bluebird docs for more details. This is non critical but is a code smell nonetheless. It could be easily handled using a custom error object
The text was updated successfully, but these errors were encountered:
I'm not sure how to accomplish it via the layers of your library but Ideally it would just bubble all errors without the unhandled rejection when accessing the pool through pool.promises since the promise api is designed to bubble errors in that way. The trick would be to accomplish this without effecting the non-promise api. Unfortunately the pool.on("error", () => {}) trick just swallows those errors without any error reporting. It works for us since we only access via the promise api
If you are using a connection pool with node 16 using pool.promises.query will cause the server to crash due to an unhandled error. It looks like this is caused by the promise error handler not satisfying the pool's event emitter. If you add
pool.on("error", () => {})
it solves the issue. This works as a workaround but should be unnecessaryAs a side note promises get rejected with an array, not an
Error
, on reader.js line 148 this results in a warning when replacing native promises with bluebird. See the bluebird docs for more details. This is non critical but is a code smell nonetheless. It could be easily handled using a custom error objectThe text was updated successfully, but these errors were encountered: