Can use FailureHandling.OPTIONAL when using assert that?

Hello Everyone, can I use FailuerHandling when using code like this?

if (assertThat(jsonResponse.OUT_DATA.ID_CATEGORY).contains(varID_CATEGORY)) {

    println('response' + response)

    println('varResponse' + varResponse)

    WS.verifyElementPropertyValue(response, 'OUT_MESS', varOUT_MESS)

    WS.verifyElementPropertyValue(response, 'OUT_STAT', varOUT_STAT)

Essentially, no because Failure Handling only applies to the APIs it is defined for. However…

You can “wrap” any block of code in a try-catch block:

try {
  // code that could go wrong
} catch (Exception e) {
  // deal with the error here