Pool > Execute > Uncaught error
See original GitHub issueWe experience a problem with execute()
; it errors and we cannot handle in the immediate codeblock, is handled outside the immediate try/catch context.
execute()
works outright in this context, however we receive this error after 20 mins of app runtime for some reason.
Q. Does anything look untoward in the execute()
debug, below?
Add command: Prepare
Add command: Execute
6 13392050 <== Execute#unknown name(0,,81)
6 13392050 <== 4d000000170300000000010000000001fd00fd00050018494e564f4b45442072656672657368546f6b656e545328291941636365737320746f6b656e2068617320657870697265642e00807dad852d7842
Add command: Prepare
Add command: Execute
2 13392018 <== Execute#unknown name(0,,42)
2 13392018 <== 26000000170300000000010000000201fd00060005000a52454652455348494e4700807dad852d784200
Add command: Prepare
0 13392019 <== Prepare#unknown name(0,,27)
0 13392019 <== 170000001653454c45435420746f6b656e2046524f4d2075736572
Add command: Execute
Fri Aug 26 2022 16:13:28 GMT+1200 (New Zealand Standard Time) 1661487208417 Error {"stack":"UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason \"#<Object>\".","message":"This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason \"#<Object>\".","name":"UnhandledPromiseRejection","code":"ERR_UNHANDLED_REJECTION"}
db = mysql.createPool({
..._oConfig,
waitForConnections: true,
connectionLimit: 10,
queueLimit: 0,
debug: true,
});
const myFunction = async () => {
try {
const [rows, fields] = await db.execute('SELECT * FROM user', []);
} catch (oError) {
console.log('HUH',oError); // NOTE: Not caught!
}
};
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
uncatchable uncaughtException in pool.execute if undefined ...
In my case the server will crash&restart on uncaughtException / unhandledRejection , so I try to add catch for most error.
Read more >java - Why is UncaughtExceptionHandler not called by ...
The threads are being started with a Runnable implementation which fetches other Runanbles (your Runnables) from the ExecutorService and executes them: ...
Read more >How to Handle Died Threads due to Uncaught Exceptions in ...
My personal preference especially while using multiple thread pools is overriding afterExecute() method, and calling execute() again on detecting an uncatched ...
Read more >TPS03-J. Ensure that tasks executing in a thread pool do not ...
This compliant solution sets an uncaught exception handler on behalf of the thread pool. A ThreadFactory argument is passed to the thread pool...
Read more >"An uncaught thread exception was caught by the threadpool ...
Errors: "An uncaught thread exception was caught by the threadpool. java.lang. ... SocketReaderRequest.execute(SocketReaderRequest.java:42)
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
Thanks for responding, much appreciated.
We will not implement this library until errors bubble to callee.
Does not seem to work for me either.
Using
"mysql2": "^2.3.3"
.It errors because of a missing value for
publish
in the data whlie it is defined as a named parameter.This is my code: