Switch error mimetype back to application/json

This commit is contained in:
Evan Cordell 2016-04-18 17:42:08 -05:00
parent 36309a04ea
commit 9a1d97216b

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))