def json_error(code, message):
    # Message can be an unserializable object.
    message = repr(message)
    return jsonify(dict(request=request.path, message=message)), code
Returns a JSON-ified error object
dataset/ETHPy150Open rehandalal/buchner/buchner/project-template/PROJECTMODULE/errors.py/json_error