Updates
This commit is contained in:
+5
-1
@@ -16,6 +16,7 @@ exports.default = dbHandler;
|
||||
const fs_1 = __importDefault(require("fs"));
|
||||
const serverError_1 = __importDefault(require("./serverError"));
|
||||
const grab_dsql_connection_1 = __importDefault(require("../../utils/grab-dsql-connection"));
|
||||
const path_1 = __importDefault(require("path"));
|
||||
/**
|
||||
* # Main DB Handler Function
|
||||
*/
|
||||
@@ -44,7 +45,10 @@ function dbHandler(...args) {
|
||||
});
|
||||
}
|
||||
catch (error) {
|
||||
fs_1.default.appendFileSync("./.tmp/dbErrorLogs.txt", JSON.stringify(error, null, 4) + "\n" + Date() + "\n\n\n", "utf8");
|
||||
const tmpFolder = path_1.default.resolve(process.cwd(), "./.tmp");
|
||||
if (!fs_1.default.existsSync(tmpFolder))
|
||||
fs_1.default.mkdirSync(tmpFolder, { recursive: true });
|
||||
fs_1.default.appendFileSync(path_1.default.resolve(tmpFolder, "./dbErrorLogs.txt"), JSON.stringify(error, null, 4) + "\n" + Date() + "\n\n\n", "utf8");
|
||||
results = null;
|
||||
(0, serverError_1.default)({
|
||||
component: "dbHandler",
|
||||
|
||||
Reference in New Issue
Block a user