Right now if one specifies a conditions for a sentinel, it is required to have both event and function arrays. From user perspective this requirement it is not really obvious: if I'm interested only in event I might assume function array is optional and write code which will not work.
Right now if one specifies a
conditions
for asentinel
, it is required to have bothevent
andfunction
arrays. From user perspective this requirement it is not really obvious: if I'm interested only inevent
I might assumefunction
array is optional and write code which will not work.i.e:
running deploy for such throws an error:
Cannot read properties of undefined (reading 'map')
While It can be fixed by adding
function
array to a conditions, it is not obvious from error message where the problem is.Proposed solution:
Return more explicit error
<sentinel_name>: conditions.function is missing