Checking for ERROR and WARN log messages

33 views
Skip to first unread message

Jernej Rus

unread,
Sep 30, 2025, 7:52:42 AM (7 days ago) Sep 30
to ZAP User Group
Hello. ZAP Automation Framework jobs might log unexpected ERROR or WARN messages. Examples:

1794825 [ZAP-ActiveScanner-16] WARN org.parosproxy.paros.core.scanner.VariantJSONQuery - Failed to parse the request body for url [MASKED] : Input is invalid JSON; does not start with '{' or '[', c=34 java.lang.IllegalArgumentException: Input is invalid JSON; does not start with '{' or '[', c=34 at org.parosproxy.paros.core.scanner.VariantJSONQuery.parseObject(VariantJSONQuery.java:139) ~[zap-2.16.1.jar:2.16.1] at org.parosproxy.paros.core.scanner.VariantJSONQuery.parseContent(VariantJSONQuery.java:89) ~[zap-2.16.1.jar:2.16.1] at org.parosproxy.paros.core.scanner.VariantAbstractRPCQuery.setRequestContent(VariantAbstractRPCQuery.java:148) ~[zap-2.16.1.jar:2.16.1] at org.parosproxy.paros.core.scanner.VariantAbstractRPCQuery.setMessage(VariantAbstractRPCQuery.java:60) [zap-2.16.1.jar:2.16.1] at org.parosproxy.paros.core.scanner.AbstractAppParamPlugin.scan(AbstractAppParamPlugin.java:91) [zap-2.16.1.jar:2.16.1] at org.parosproxy.paros.core.scanner.AbstractPlugin.run(AbstractPlugin.java:391) [zap-2.16.1.jar:2.16.1] at java.base/java.lang.Thread.run(Thread.java:840) [?:?]

1465072 [BiDi Connection] ERROR org.zaproxy.zap.ZAP.UncaughtExceptionLogger - Exception in thread "BiDi Connection"

I don't want to disregard such messages, even if the job passes anyway. At the end of the ZAP plan, I want to check if the amount of ERROR and WARN messages is greater than 0. Do any ZAP statistics track these amounts? Or is there a better way to do this?

Simon Bennetts

unread,
Oct 3, 2025, 12:40:53 PM (4 days ago) Oct 3
to ZAP User Group
Hiya,

We do have the statistic "stats.error.core.uncaught" which you could check?
Sadly not mentioned on https://www.zaproxy.org/docs/internal-statistics/ so we should fix that asap.
But it would be more useful if we had other stats for the errors and warnings as well.
We'll have a think and see what we can come up with..

Cheers,

Simon

Jernej Rus

unread,
3:01 AM (14 hours ago) 3:01 AM
to ZAP User Group
Thank you for the reply. I'll check out stats.error.core.uncaught. I was also thinking of creating an appender or a filter for rootLogger that monitors for LogEvent with level equal to or greater than WARN. Do you see any issues here?
Reply all
Reply to author
Forward
0 new messages