ignore appsec policy update notification command error

This commit is contained in:
Rami Winestock
2023-12-20 15:51:02 +02:00
parent c6c7319b0c
commit b13d8e07da
2 changed files with 9 additions and 11 deletions

View File

@@ -108,7 +108,7 @@ const internalNginxOpenappsec = {
// Return the notifyPolicyUpdate promise chain
// notify openappsec to apply the policy
return internalNginxOpenappsec.notifyPolicyUpdate().catch((errorMessage) => {
console.error('Error:', errorMessage);
// console.error('Error:', errorMessage);
const errorMessageForUI = `Error: Policy couldnt be applied, open-appsec-agent container is not responding.
Check if open-appec-agent container is running, then apply open-appsec Configuration
again by clicking here:
@@ -116,10 +116,6 @@ const internalNginxOpenappsec = {
return Promise.reject(new Error(errorMessageForUI));
});
})
.catch((err) => {
logger.error('Error generating openappsec config:', err);
throw err; // Propagate the error to the caller
});
},
@@ -157,7 +153,7 @@ const internalNginxOpenappsec = {
})
.catch((err) => {
logger.error('Error deleting openappsec config:', err);
throw err; // Propagate the error to the caller
// throw err; // Propagate the error to the caller
});
},
@@ -238,9 +234,9 @@ const internalNginxOpenappsec = {
}
}
if (lastError) {
throw lastError;
}
// if (lastError) {
// throw lastError;
// }
},
/**

View File

@@ -100,7 +100,8 @@ const internalProxyHost = {
return row;
})
.catch((err) => {
throw new error.ConfigurationError(err.message);
console.log("Error generating openappsec config: " + err);
// throw new error.ConfigurationError(err.message);
});
})
.then((row) => {
@@ -184,7 +185,8 @@ const internalProxyHost = {
return row;
})
.catch((err) => {
throw new error.ConfigurationError(err.message);
console.log("Error generating openappsec config: " + err);
// throw new error.ConfigurationError(err.message);
});
})
.then((row) => {