Trigger condition fails to run as intended

Hello

We have a catch all alert using an extraction query for string “[ERROR]”. The problem with this is that this is such a generic string we get unecassary alerts, Unfortunately we cant change the search string but what we can do is add conditions to the trigger so it dosent trigger if there are specific strings in the log.

However, the following condition I wrote seems not to be working as we are still receiving alerts for the strings I have said to ignore. Its probably an obvious mistake but I cant see it

ctx.results[0].hits.total.value >= 10 && 
(((!ctx.results[0].hits.hits[0]._source.message.contains("[ERROR] [com.verifone.apg.server.data.interfaces.online.iso.ISONetworkManagerAsync] (Weaver-ISO-host-async-")) &&
(!ctx.results[0].hits.hits[0]._source.message.contains("Unknown Exception java.lang.NullPointerException"))) ||
((!ctx.results[0].hits.hits[0]._source.message.contains("Error to execute SQL query:(insertEfttran()")) &&
(!ctx.results[0].hits.hits[0]._source.message.contains("java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint"))))