title: Jmeter Script-Error Message in Response Data but Successful result in sample Result
body: <p>While running Jmeter scripts, one of the step is failing but Successful Result is coming in Sample Result as:</p>
  
  <pre><code>Sample Count: 1
  Error Count: 1
  Response code: 200
  Response message: OK
  </code></pre>
  
  <p>But error message is coming in Response Data as:</p>
  
  <pre><code>Unfortunately, we could not delete your entire itinerary because of a database synchronization error.  
  If you could please re-load your itinerary and try again, we would appreciate it.
  Thank you for your patience.
  </code></pre>
  
  <p>I need to re-submit the Request for that i am using the While loop comparing the Response Data then try to resubmit the request which is not working as.</p>
  
  <pre><code>if(ResponseData.equals("Unfortunately")==true)
  {
      log.error("Database synchronization error...Re sending Request");
      vars.put("resubmitflag","true");
  }
  </code></pre>
  
  <p>The problem i believe that i am not using correct functions for it as 
  ResponseData.equals will not work as how we can compare whole response data 
  which is not possible.</p>
  
  <p>Kindly anyone help how to proceed and what functions need to use for that.</p>