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?