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
From the documentation it seems that you should not handle exceptions during .createPool() but instead during .aquire(). However if the factory.create() function fails, it continues to retry. I've tried both throwing an exception and rejecting the promise and I'm unable to get any controlled failure path from the operation.
In the above example, aquire is never reached, and I get an endless loop of 'create called' and 'rejecting promise'. The behaviour is the same if I reject or throw.
...
create called
rejecting promise
create called
rejecting promise
create called
rejecting promise
create called
rejecting promise
^C
How can I reliably handle, for example, connection errors to a database, if the user provides incorrect config? Currently either I get a timeout unhandled exception from the DB library, or a hang/endless loop.
The text was updated successfully, but these errors were encountered:
@Kikobeats@sandfox any update on this issue? It continues to be a source of debugging trouble, with any connection error silently causing an endless loop.
From the documentation it seems that you should not handle exceptions during
.createPool()
but instead during.aquire()
. However if thefactory.create()
function fails, it continues to retry. I've tried both throwing an exception and rejecting the promise and I'm unable to get any controlled failure path from the operation.In the above example,
aquire
is never reached, and I get an endless loop of 'create called' and 'rejecting promise'. The behaviour is the same if Ireject
orthrow
.How can I reliably handle, for example, connection errors to a database, if the user provides incorrect config? Currently either I get a timeout unhandled exception from the DB library, or a hang/endless loop.
The text was updated successfully, but these errors were encountered: