openhab/openhab-core

Report ruleUID when Script Condition doesn't return a boolean

Closed this issue · 0 comments

I have a broken rule somewhere with a bogus Script Condition. Unfortunately the error I get is:

2024-04-09 13:13:59.958 [ERROR] [ernal.handler.ScriptConditionHandler] - Script did not return a boolean value, but 'null'

Looking at the code:

the ruleUID is available. It would be helpful to end users if that ruleUID were included in this and the "Script execution failed" error messages to make identifying the cause of the error easier.

Your Environment

  • Version used: (e.g., openHAB and add-on versions) OH 4.2 M2
  • Environment name and version (e.g. Chrome 111, Java 17, Node.js 18.15, ...): Official Docker image
  • Operating System and version (desktop or mobile, Windows 11, Raspbian Bullseye, ...):