title: What status codes are raised internally by Flask?
body: <p>I want to make sure my error responses are all valid JSON so my client can parse them. The Flask docs mention status codes 404 and 500 are raised internally, but I've seen some threads about how it can also return a 405. Is there a list of the codes that the Flask framework that I should handle?</p>
  
  <p>I could simply go through and handle all the HTTP status codes, but that seems a bit heavy-handed for a Flask application.</p>
  
  <pre><code>@app.errorhandler(500)
  def handle500error(error):
      return json.dumps(dict(error_message="A serious error occurred.")), 500
  </code></pre>
  
  <p>Alternately, is there a generic way to handle otherwise-unhandled errors?</p>