From eb72bbb30df449cda1c95d683c430bead64ef20d Mon Sep 17 00:00:00 2001 From: khanshanawaz10 Date: Tue, 19 Dec 2023 18:43:40 +0530 Subject: [PATCH] fix - error query var char to into int issue resolved --- controller/Errorlog/index.js | 2 +- controller/getTransactionById/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controller/Errorlog/index.js b/controller/Errorlog/index.js index 5c52825..211da5a 100644 --- a/controller/Errorlog/index.js +++ b/controller/Errorlog/index.js @@ -4,7 +4,7 @@ const { getCurrentDateTime } = require("../helper"); function errorLogStatus(error = null, funName = null) { let query = `INSERT INTO providentialadvisory.dbo.User_log (client_code, request, status, response, created_date, created_by, api_name, Open_Close_Status, IPAddress, DeviceId, [Source], Header) -VALUES('', '${(error).toString()}', ${0}, '', '${getCurrentDateTime()}', '', '${funName}', ${0}, '', '', '', '')`; +VALUES('', '${error}','', '', '${getCurrentDateTime()}', '', '${funName}', '', '', '', '', '')`; return db.sequelize.query(query, { type: db.sequelize.QueryTypes.INSERT }); } diff --git a/controller/getTransactionById/index.js b/controller/getTransactionById/index.js index 8561b92..c6b995a 100644 --- a/controller/getTransactionById/index.js +++ b/controller/getTransactionById/index.js @@ -69,7 +69,7 @@ const getTransactionById = (checkInvestorId, checkRequestId) => { }, 10); } }); - } catch { + } catch (err) { errorLogStatus(err, "nodeJs_liquiloan_getTransactionById") } }