title: Zend Framework 2 AbstractRestfulController - Exceptions as JSON
body: <p>My goal is get a JSON like </p>
  
  <pre class="lang-json prettyprint-override"><code>{ 
    "meta": { 
      "error_type": "error type", 
      "code": 400, 
      "error_message": "error msg" 
    } 
  }
  </code></pre>
  
  <p>In case something went wrong.
  I tried to put the try catch block both in the rest controller's action and in the model but I get the whole exception stack (I mean with the layout + view)</p>
  
  <p>What's the right way ?</p>