fix(db): handle errors during callbacks

Handles errors that would previously disappear into the void or show as 'undefined'.

In Lua this would only occur if yielding during the query callback response.

Cross runtime error handling is suffering.
This commit is contained in:
Linden committed 2022-06-26 04:02:50 +10:00
1 parent db0f29db42
commit d80615bddc
5 files changed
+51 -34

No files matched your search

+1 -1
View File
@@ -15,4 +15,4 @@ export type TransactionQuery = {
// working with this type is impossible but at least we can pretend to be strictly typed
export type CFXParameters = any[];
export type CFXCallback = (result: QueryResponse | number | null, err?: string) => void;
export type CFXCallback = (result: unknown, err?: string) => Promise<unknown>;