title: Making ink! Smart Contracts Revert
body: <p>I'm tweaking with ink! Smart contracts and deployed some test contracts through <a href="https://polkadot.js.org/" rel="nofollow noreferrer">https://polkadot.js.org/</a>. However, despite setting conditional statements within smart contracts, calls to them still pass without reverting. Am I doing something wrong with the error handling?</p>
  <p>Example code:</p>
  <pre><code>  #[ink(message)]
      pub fn withdraw_(&amp;mut self, value: Balance) -&gt; Result&lt;()&gt;  {
          let caller= self.env().caller();
          let contract_address = self.env().account_id();
          let ticket_count = self.tickets_of_or_zero(caller);
  
      
  
          if ticket_count &lt;= 0 {
              return  Err(Error::InsufficientTickets)
          }
  
          self.tickets.insert(caller, ticket_count - 1);
  
        let transfer_status =  self.transfer_from_to_reentrant(contract_address,caller,value);
  
        if !transfer_status {
            return Err(Error::UnsucceededTransfer)
        }
  
          
  
          Ok(())
      }
  </code></pre>