Query's "Failure conditions" is presenting conflicting messaging about boolean type

Goal

Set failure conditions on a REST query with a truthy value, as the input itself advises.

Steps

  1. In a resource query, go to the "Response" tab and add an expression for a truthy condition.
  2. Note the pop-out in red that reads "The value has to be of type 'string | void', you provided 'boolean'"
  3. Try an expression that evaluates as falsey.
  4. Note the pop-out in green that accepts the result of the expression as a boolean.

Details

Interestingly, if I write a boolean literal directly I get the same results: the input does not like true, but accepts false.

The tooltip for this input explicitly states "If a condition here returns as a truthy value...", so I figure my expectation about the type of value to input is correct.

Also important is that the handler seems to work either way in my case, it's just the directive of the pop-out that is the conflicting message here, which is confusing unless you know to ignore it.

Screenshots

Real-world value I want to check:

Retool - Failure conditions - bug 1

Retool - Failure conditions - bug 2

And canned example with just the boolean literals:

Retool - Failure conditions - bug 3

Retool - Failure conditions - bug 4

1 Like

HI @dguzzo, definitely looks like an issue with our validation. Ignore the error for now. We created and internal bug report and we'll update you here when it's fixed. Thank you for you feedback! :slightly_smiling_face:

1 Like