Merge pull request #1382 from ecordell/error-mimetype

Switch error mimetype back to application/json
This commit is contained in:
Evan Cordell 2016-04-18 17:45:07 -05:00
commit 2fb851c098

View file

@ -38,7 +38,7 @@ api.decorators = [csrf_protect,
@api_bp.app_errorhandler(ApiException)
@crossdomain(origin='*', headers=['Authorization', 'Content-Type'])
def handle_api_error(error):
response = Response(json.dumps(error.to_dict()), error.status_code, mimetype='application/problem+json')
response = Response(json.dumps(error.to_dict()), error.status_code, mimetype='application/json')
if error.status_code == 401:
response.headers['WWW-Authenticate'] = ('Bearer error="%s" error_description="%s"' %
(error.error_type.value, error.error_description))