[Feature-14336]Script Evaluation Error Tooltip Is Not Helpful

I have a script which is throwing an Error_ScriptEval warning in the script transform editor, but the tooltip provides only part of a stacktrace which refers to internals instead of my code, so I only know where the error is occurring, but not why.

Offending code:

query = 'a working query'
database = 'CRS'
txid = system.db.beginTransaction(database=database, isolationLevel=system.db.SERIALIZABLE, timeout=3000)
system.db.runQuery(query=query, database=database, tx=txid)

Tooltip (line 10 is the system.db.runQuery call):

Error_ScriptEval("Traceback(most recent call last):
    File "<transform>", line 10, in transform 
at com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities.error(AbstractDBUtilities.java:362)
at com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities.error(AbstractDBUtilities.java:333)
at jdk,internal.reflect.GeneratedMethodAcccessor226.invoke(Unknown Source)

If I actually trigger the offending code, then logging I’ve place immediately after the offending code is never displayed in the logs. I see no logging of the transform failing, it just quietly fails and doesn’t clarify why.

Any insight would be appreciated!

Try putting the Gateway.Database.Selects (or Updates, as appropriate) logger to TRACE on the gateway and see whether any useful information is given about why the query is failing. The stacktrace is just indicating some exception happened, but not really indicating what the problem is, so logs are your best bet.

https://support.inductiveautomation.com/index.php?/Knowledgebase/Article/View/119/0/obtaining-ignition-logs#change-logger-level