title: Raising A Custom Error with Flask-Restful
body: <p>All, I'm trying to raise a custom error using Flask-Restful, following <a href="http://flask-restful.readthedocs.org/en/latest/extending.html#define-custom-error-messages" rel="noreferrer">the docs</a>. For testing purposes, I've defined and registered the errors dictionary exactly link in the docs: <code>api = flask_restful.Api(app, errors=errors)</code>.</p>
  
  <p>However, when I want to raise the custom error using (e.g.) <code>abort(409)</code> within the resource module, firebug reports:</p>
  
  <blockquote>
    <p>{
        "message": "Conflict", 
        "status": 409
    }</p>
  </blockquote>
  
  <p>This seems like the standard 409 error, nothing custom; from the docs, I would expect the custom error message- "A user with that username already exists."</p>
  
  <p>I think I'm missing something regarding the raising of the error itself. Should I use the dictionary key in any way? Reviewing the Flask-Restful source code didn't help, though I tried.</p>