title: Return error response if assertion fails in SoapUI
body: <p>I would like to return a custom error message if an assertion fails in <code>SoapUI</code>. </p>
  
  <p>I have written assertions. I always get OK response even though the assertion fails.</p>
  
  <p>I tried below script:</p>
  
  <pre><code>def assertionList = []
  
  def idNotNull = (id!=null) ? "(id is not null" : assertionList.add("(id is null")
  
  if(!assertionList.isEmpty())
  {
      return "exceptionResponse"
  }
  assert assertionList.isEmpty() : assertionList.toString()
  </code></pre>
  
  <p>But this will return before assert is executed. Hence assertion is passed though it should fail.</p>
  
  <p>Is there a way that I can achieve this?</p>