@@ -1,4 +1,4 @@
|
||||
const CdkBase = require("../web-sockets/web-socket");
|
||||
const { createLogEvent } = require("../web-sockets/createLogEvent");
|
||||
|
||||
const IMEX_CDK_USER = process.env.IMEX_CDK_USER,
|
||||
IMEX_CDK_PASSWORD = process.env.IMEX_CDK_PASSWORD;
|
||||
@@ -14,7 +14,7 @@ const cdkDomain =
|
||||
function CheckCdkResponseForError(socket, soapResponse) {
|
||||
if (!soapResponse[0]) {
|
||||
//The response was null, this might be ok, it might not.
|
||||
CdkBase.createLogEvent(
|
||||
createLogEvent(
|
||||
socket,
|
||||
"warn",
|
||||
`Warning detected in CDK Response - it appears to be null. Stack: ${new Error().stack}`
|
||||
@@ -43,11 +43,7 @@ function checkIndividualResult(socket, ResultToCheck) {
|
||||
//TODO: Verify that this is the best way to detect errors.
|
||||
return;
|
||||
else {
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"ERROR",
|
||||
`Error detected in CDK Response - ${JSON.stringify(ResultToCheck, null, 2)}`
|
||||
);
|
||||
createLogEvent(socket, "ERROR", `Error detected in CDK Response - ${JSON.stringify(ResultToCheck, null, 2)}`);
|
||||
|
||||
throw new Error(`Error found while validating CDK response for ${JSON.stringify(ResultToCheck, null, 2)}:`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user