mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-01 14:38:50 +00:00
fix(db): incorrect error handling when no callback is defined
Partly reverts some changes made for the experimental transaction export.
This commit is contained in:
1 parent
8b8670e462
commit
46a7dabc1e
3 files changed
+3
-10
No files matched your search
@@ -21,7 +21,7 @@ export const rawQuery = async (
|
||||
try {
|
||||
[query, parameters] = parseArguments(query, parameters);
|
||||
} catch (err: any) {
|
||||
return logError(invokingResource, cb, err, isPromise, query, parameters);
|
||||
return logError(invokingResource, cb, isPromise, err, query, parameters);
|
||||
}
|
||||
|
||||
const connection = await getPoolConnection(connectionId);
|
||||
@@ -54,8 +54,6 @@ export const rawQuery = async (
|
||||
}
|
||||
}
|
||||
} catch (err: any) {
|
||||
if (!cb) throw new Error(err.message || err);
|
||||
|
||||
logError(invokingResource, cb, isPromise, err, query, parameters, true);
|
||||
} finally {
|
||||
connection.release();
|
||||
|
||||
Reference in new issue
Block a user