|
@@ -115,7 +115,7 @@ def api_error_handler(f):
|
|
|
if e.message and isinstance(e.message, basestring):
|
|
if e.message and isinstance(e.message, basestring):
|
|
|
response['message'] = e.message
|
|
response['message'] = e.message
|
|
|
except ValidationError as e:
|
|
except ValidationError as e:
|
|
|
- LOG.exception('Error validation %s' % func)
|
|
|
|
|
|
|
+ LOG.exception('Error validation %s' % f)
|
|
|
response['status'] = -1
|
|
response['status'] = -1
|
|
|
response['message'] = e.message
|
|
response['message'] = e.message
|
|
|
except OperationTimeout as e:
|
|
except OperationTimeout as e:
|
|
@@ -124,7 +124,7 @@ def api_error_handler(f):
|
|
|
response['status'] = 2
|
|
response['status'] = 2
|
|
|
response['message'] = e.message
|
|
response['message'] = e.message
|
|
|
except QueryError as e:
|
|
except QueryError as e:
|
|
|
- LOG.exception('Error running %s' % func.__name__)
|
|
|
|
|
|
|
+ LOG.exception('Error running %s' % f.__name__)
|
|
|
response['status'] = 1
|
|
response['status'] = 1
|
|
|
response['message'] = smart_unicode(e)
|
|
response['message'] = smart_unicode(e)
|
|
|
if response['message'].index("max_row_size"):
|
|
if response['message'].index("max_row_size"):
|
|
@@ -148,7 +148,7 @@ def api_error_handler(f):
|
|
|
response['status'] = 1
|
|
response['status'] = 1
|
|
|
response['message'] = message.get('error')
|
|
response['message'] = message.get('error')
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
|
- LOG.exception('Error running %s' % func.__name__)
|
|
|
|
|
|
|
+ LOG.exception('Error running %s' % f.__name__)
|
|
|
response['status'] = -1
|
|
response['status'] = -1
|
|
|
response['message'] = smart_unicode(e)
|
|
response['message'] = smart_unicode(e)
|
|
|
finally:
|
|
finally:
|