This commit is contained in:
Benjamin Toby
2025-02-19 20:01:50 +01:00
parent c08db13f3d
commit e9bb9fb07f
113 changed files with 253 additions and 63 deletions
+5 -3
View File
@@ -45,7 +45,10 @@ export default async function connDbHandler<ReturnType = any>(
);
resArray.push(JSON.parse(JSON.stringify(queryObjRes)));
} catch (error: any) {
console.log(`connDbHandler Query Error: ${error.message}`);
global.ERROR_CALLBACK?.(
`Connection DB Handler Query Error`,
error as Error
);
resArray.push(null);
}
}
@@ -55,8 +58,7 @@ export default async function connDbHandler<ReturnType = any>(
return null;
}
} catch (error: any) {
console.log(`connDbHandler Error: ${error.message}`);
console.log(conn?.config());
global.ERROR_CALLBACK?.(`Connection DB Handler Error`, error as Error);
return null;
} finally {
conn?.end();