improved error loggin and updated imports to fix build failure

This commit is contained in:
2024-06-19 15:06:28 +01:00
parent d01179c724
commit be99db0774
78 changed files with 319 additions and 325 deletions
+7 -9
View File
@@ -53,12 +53,10 @@ export default async function ApiProxy(req, res) {
console.log(
"\n==========================================\n",
"basic search: " + queryUrl,
"\n\n",
"basic search relay link: " +
WEBAPI_URL +
queryUrl +
hashAPIPath(queryUrl),
"\nBasic search ",
"\nSearch String: " + searchString,
"\n\nQuery url: " + queryUrl,
"\n\nRelay link: " + WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
"\n==========================================\n"
);
@@ -77,9 +75,9 @@ export default async function ApiProxy(req, res) {
(data["@odata.nextLink"] = dataStr.split("/v8.2/")[1]));
res.status(200).json(data);
})
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
.catch((error) => {
consoleLogger(error);
res.status(400).json(error);
})
: res.status(400).json();