def default_json_error(ex):
 logger = get_logger()
 logger.error('Uncaught error thrown by Flask/Werkzeug', exc_info=ex)
 response = jsonify(message=str(ex), type='api_error')
 response.status_code = (ex.code if isinstance(ex, HTTPException) else 500)
 return response

def default_json_error ( ex ) : logger = get_logger ( ) logger . error ( 'Uncaught error thrown by Flask/Werkzeug' , exc_info = ex ) response = jsonify ( message = str ( ex ) , type = 'api_error' ) response . status_code = ( ex . code if isinstance ( ex , HTTPException ) else 500 ) return response
exception -> flask json responder .