Updates
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user