title: How to turn off development error messages in Phoenix framework?
body: <p>Right now I'm getting nice error messages from my Phoenix server:</p>
  
  <p><a href="https://i.stack.imgur.com/xKnQB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xKnQB.png" alt="Nice phoenix error message"></a></p>
  
  <p>However, I'm using Phoenix as an API, and these error messages show up as a large chunk of unreadable html:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;UndefinedFunctionError at GET /api/v1/sessions/test&lt;/title&gt;
      &lt;meta name="viewport" content="width=device-width"&gt;
      &lt;style&gt;/*! normalize.css v4.2.0 | MIT License | github.com/necolas/normalize.css */html{font
        ...1300+ lines...
  </code></pre>
  
  <p>Is there a way to turn this off so my development server spits out JSON error messages instead? Thanks.</p>