Skip to content

Commit 898bf88

Browse files
authored
Merge pull request #2614 from akto-api-security/fix/threat-be-apis
add null check for log
2 parents cbf562e + 935c202 commit 898bf88

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/threat-detection/src/main/java/com/akto/threat/detection/tasks/ThreatConfigurationEvaluator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ public String getActorId(HttpResponseParams responseParam) {
9797
getThreatConfiguration();
9898
String actor = SourceIPActorGenerator.instance.generate(responseParam).orElse("");
9999
responseParam.setSourceIP(actor);
100-
logger.debugAndAddToDbCount("Actor ID generated: " + actor + " for response: " + responseParam.getOriginalMsg().get());
100+
if (responseParam.getOriginalMsg() != null) {
101+
logger.debugAndAddToDbCount("Actor ID generated: " + actor + " for response: " + responseParam.getOriginalMsg().get());
102+
}
101103

102104
if (threatConfiguration == null) {
103105
return actor;

0 commit comments

Comments
 (0)