error handling logging and debug to server console

This commit is contained in:
2022-07-19 11:51:16 +01:00
parent be9f86b6b2
commit 31738d38fa
61 changed files with 372 additions and 155 deletions
+3 -2
View File
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -43,7 +43,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
+3 -2
View File
@@ -1,7 +1,7 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -65,7 +65,8 @@ export default async function ApiProxy(req, res) {
console.log(data);
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
+3 -2
View File
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -43,7 +43,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -43,7 +43,8 @@ export default async function ApiProxy(req, res) {
//console.log("deleted awaitingsubmission case - " + incidentID);
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -42,7 +42,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
+3 -2
View File
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -43,7 +43,8 @@ export default async function ApiProxy(req, res) {
//console.log("deleted watched case - " + watchedCaseID);
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
+3 -2
View File
@@ -1,7 +1,7 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -75,7 +75,8 @@ export default async function ApiProxy(req, res) {
(data["@odata.nextLink"] = dataStr.split("/v8.2/")[1]));
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
@@ -93,7 +93,8 @@ export default async function ApiProxy(req, res) {
(data["@odata.nextLink"] = dataStr.split("/v8.2/")[1]));
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
+3 -2
View File
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeaders } from "../../../actions";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -39,7 +39,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
+8 -2
View File
@@ -1,6 +1,11 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeadersPaged, azureHeaders } from "../../../actions";
import {
getToken,
azureHeadersPaged,
azureHeaders,
consoleLogger,
} from "../../../actions";
/**
* @swagger
* /api/endpoint/getappealtypes_api:
@@ -47,7 +52,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeaders } from "../../../actions";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -38,7 +38,8 @@ export default async function ApiProxy(req, res) {
});
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeaders } from "../../../actions";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -38,7 +38,8 @@ export default async function ApiProxy(req, res) {
//console.log(data);
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
+8 -2
View File
@@ -1,7 +1,12 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { getToken, azureHeaders, azureHeadersPaged } from "../../../actions";
import {
getToken,
azureHeaders,
azureHeadersPaged,
consoleLogger,
} from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -41,7 +46,8 @@ export default async function ApiProxy(req, res) {
(data["@odata.nextLink"] = dataStr.split("/v8.2/")[1]));
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -1,7 +1,7 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
import { getSelectQuery } from "../../../actions/selectQueryTypes";
const WORDKEY = process.env.HASHKEY;
@@ -44,7 +44,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
})
: res.status(400).json();
@@ -1,7 +1,7 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
import { getSelectQuery } from "../../../actions/selectQueryTypes";
const WORDKEY = process.env.HASHKEY;
@@ -48,7 +48,8 @@ export default async function ApiProxy(req, res) {
(data["@odata.nextLink"] = dataStr.split("/v8.2/")[1]));
return res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
})
: res.status(400).json();
@@ -51,7 +51,8 @@ export default async function ApiProxy(req, res) {
(data["@odata.nextLink"] = dataStr.split("/v8.2/")[1]));
return res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -1,7 +1,7 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -49,7 +49,8 @@ export default async function ApiProxy(req, res) {
(data["@odata.nextLink"] = dataStr.split("/v8.2/")[1]));
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
})
: res.status(400).json();
@@ -44,7 +44,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
+3 -2
View File
@@ -1,7 +1,7 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -49,7 +49,8 @@ export default async function ApiProxy(req, res) {
(data["@odata.nextLink"] = dataStr.split("/v8.2/")[1]));
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
})
: res.status(400).json();
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeaders } from "../../../actions";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
import { getSelectQuery } from "../../../actions/selectQueryTypes";
const WORDKEY = process.env.HASHKEY;
@@ -44,7 +44,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -1,7 +1,7 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
import { getSelectQuery } from "../../../actions/selectQueryTypes";
const WORDKEY = process.env.HASHKEY;
@@ -52,7 +52,8 @@ export default async function ApiProxy(req, res) {
(data["@odata.nextLink"] = dataStr.split("/v8.2/")[1]));
return res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -62,7 +62,8 @@ export default async function ApiProxy(req, res) {
dataStr.split("/v8.2/")[1]));
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
})
: res.status(400).json();
+3 -2
View File
@@ -1,7 +1,7 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { getToken, azureHeaders } from "../../../actions";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -38,7 +38,8 @@ export default async function ApiProxy(req, res) {
(data["@odata.nextLink"] = dataStr.split("/v8.2/")[1]));
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
+8 -2
View File
@@ -1,6 +1,11 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeadersPaged, azureHeaders } from "../../../actions";
import {
getToken,
azureHeadersPaged,
azureHeaders,
consoleLogger,
} from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -36,7 +41,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
+3 -2
View File
@@ -1,7 +1,7 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { getToken, azureHeaders } from "../../../actions";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -41,7 +41,8 @@ export default async function ApiProxy(req, res) {
(data["@odata.nextLink"] = dataStr.split("/v8.2/")[1]));
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -1,7 +1,7 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { getToken, azureHeaders } from "../../../actions";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -38,7 +38,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
})
: res.status(400).json();
+8 -2
View File
@@ -1,6 +1,11 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeadersPaged, azureHeaders } from "../../../actions";
import {
getToken,
azureHeadersPaged,
azureHeaders,
consoleLogger,
} from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -37,7 +42,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
+3 -2
View File
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -37,7 +37,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
+4 -2
View File
@@ -1,7 +1,7 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -44,9 +44,11 @@ export default async function ApiProxy(req, res) {
azureHeadersPaged(token.access_token)
)
.then(({ data }) => {
console.log(data);
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
})
: res.status(400).json();
+8 -3
View File
@@ -1,6 +1,11 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeadersPaged, azureHeaders } from "../../../actions";
import {
getToken,
azureHeadersPaged,
azureHeaders,
consoleLogger,
} from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -35,8 +40,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
console.log(err);
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
+6 -1
View File
@@ -1,6 +1,11 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeadersPaged, azureHeaders } from "../../../actions";
import {
getToken,
azureHeadersPaged,
azureHeaders,
consoleLogger,
} from "../../../actions";
const WORDKEY = process.env.HASHKEY;
+3 -2
View File
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeaders } from "../../../actions";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -39,7 +39,8 @@ export default async function ApiProxy(req, res) {
});
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeaders } from "../../../actions";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -34,7 +34,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeaders } from "../../../actions";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -34,7 +34,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
+3 -2
View File
@@ -1,7 +1,7 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -54,7 +54,8 @@ export default async function ApiProxy(req, res) {
(data["@odata.nextLink"] = dataStr.split("/v8.2/")[1]));
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
})
: res.status(400).json();
+3 -2
View File
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeaders } from "../../../actions";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -36,7 +36,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
})
: res.status(400).json();
+1 -1
View File
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeaders } from "../../../actions";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeaders } from "../../../actions";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
import { getSelectQuery } from "../../../actions/selectQueryTypes";
const WORDKEY = process.env.HASHKEY;
@@ -43,7 +43,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeaders } from "../../../actions";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
import { getSelectQuery } from "../../../actions/selectQueryTypes";
const WORDKEY = process.env.HASHKEY;
@@ -39,7 +39,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
+3 -2
View File
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeaders } from "../../../actions";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -34,7 +34,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeaders } from "../../../actions";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -34,7 +34,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -1,7 +1,7 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { getToken, azureHeaders } from "../../../actions";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -74,7 +74,8 @@ export default async function ApiProxy(req, res) {
// (data["@odata.nextLink"] = dataStr.split("/v8.2/")[1]));
res.status(200).json(dataArr);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -1,7 +1,7 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -62,7 +62,8 @@ export default async function ApiProxy(req, res) {
(data["@odata.nextLink"] = dataStr.split("/v8.2/")[1]));
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -82,7 +82,8 @@ export default async function ApiProxy(req, res) {
(data["@odata.nextLink"] = dataStr.split("/v8.2/")[1]));
return res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -36,7 +36,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -41,7 +41,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -1,6 +1,6 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeaders } from "../../../actions";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -34,7 +34,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
+2 -1
View File
@@ -63,7 +63,8 @@ export default async function ApiProxy(req, res) {
});
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
@@ -34,7 +34,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
+3 -2
View File
@@ -1,7 +1,7 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -52,7 +52,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
+2 -1
View File
@@ -44,7 +44,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}
+2 -1
View File
@@ -44,7 +44,8 @@ export default async function ApiProxy(req, res) {
.then(({ data }) => {
res.status(200).json(data);
})
.catch(({ err }) => {
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
});
}