Merge pull request #1382 from ecordell/error-mimetype
Switch error mimetype back to application/json
This commit is contained in:
commit
2fb851c098
1 changed files with 1 additions and 1 deletions
|
@ -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))
|
||||
|
|
Reference in a new issue