title: Ruby on Rails: passing object with exception from Model
body: <p>Frankly I know that what stands in the title is probably impossible but I couldn't come up with something better.</p>
  
  <p>My problem is that I'm not using ActiveRecord to get/save data but some dedicated api via webservice. As such I need to handle some exceptions coming from it (e.g. send mails) but I want to do it in the model to avoid redundancy in the code. By now the only idea that I've come up with is raising exceptions for certain responses from this webservice to generate proper actions in the application controller. Unfortunately one of my actions is to send emails with request and responses from webservice which generated the error. The question is, how can I pass them to the controller?</p>