Skip to content

Commit 935c202

Browse files
committed
add null check for log
1 parent c386db2 commit 935c202

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)