ip logging for error reporting

This commit is contained in:
2024-04-08 09:46:25 +01:00
parent e532e0a0ab
commit fac12242e9
19 changed files with 96 additions and 29 deletions
+8 -3
View File
@@ -52,9 +52,14 @@ export default async function ApiProxy(req, res) {
"')) and pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true";
console.log(
"basic search ",
queryUrl,
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl)
"\n==========================================\n",
"basic search: " + queryUrl,
"\n\n",
"basic search relay link: " +
WEBAPI_URL +
queryUrl +
hashAPIPath(queryUrl),
"\n==========================================\n"
);
var apiResponse = _.isEmpty(req.query)
@@ -65,7 +65,14 @@ export default async function ApiProxy(req, res) {
queryUrl = queryUrl + getSelectQuery(appealTypeName);
console.log("///////////\nquery: ", queryUrl, "<<<<end query");
console.log(
"\n==========================================\n",
"\ndetails query: ",
queryUrl,
"\n\n",
"<<<<end query",
"\n==========================================\n"
);
return axios
.get(
@@ -45,7 +45,12 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { getToken, azureHeadersPagedCustom } from "../../../actions";
import {
getToken,
azureHeadersPagedCustom,
consoleLogger,
getIP,
} from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -127,7 +132,7 @@ export default async function ApiProxy(req, res) {
return res.status(200).json(data);
})
.catch((err) => {
console.log(consoleLogger(err));
consoleLogger(err);
res.status(400).json(err);
});
}