Error handling in `Database.query` broken as of 2.4.0
See original GitHub issueSince 2.4.0 we find that if we issue queries returning errors using the async (Promise returning) version of the Database.query
method, the promise is never resolved / the error isn’t raised.
If I roll back our reference to 2.3.1 it works as expected.
try {
return await db.query('select 1 from sysibm.syszzzz where 1=1');
} catch (e) {
// on v2.4.0 this catch is never executed and nothing is returned
console.log(e.message, e.stack);
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How do I catch a query exception in laravel to see if it fails?
The simplest way to catch any sql syntax or query errors is to catch an Illuminate\Database\QueryException after providing closure to your ...
Read more >How to implement error handling in SQL Server - SQLShack
SQL Server error handling can be as simple as just logging that something happened, or it could be us trying to fix an...
Read more >Database Engine events and errors - SQL Server
Consult this MSSQL error code list to find explanations for error messages for SQL Server database engine events.
Read more >Best Practices - Apache Airflow
You should treat tasks in Airflow equivalent to transactions in a database. This implies that you should never produce incomplete results from your...
Read more >What's new in django-cachalot? - Read the Docs
Fixes a very unlikely invalidation issue occurring only when an error occurred in a transaction after a transaction of another database nested in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I used your test case promise-test-open-close as a start
i ran it agains 2.4.0
and " 2.3.9
2.4.0 didn’t produce any error and stopped
in my production system this leads to a timeout
hope this helps
Question … why are you closing this ? the issue is not fixed, there’s no published package that contains you fix
Installing directly the github repo is not working either as this creates other problems)
thanks
for me this is a bug fix and i would suggest publishing more often bug releases
thanks