35 lines
1.5 KiB
Diff
35 lines
1.5 KiB
Diff
diff -r dfbbed6b42d5 trytond/trytond/protocols/dispatcher.py
|
|
--- a/trytond/trytond/protocols/dispatcher.py Thu Apr 07 00:04:01 2016 +0200
|
|
+++ b/trytond/trytond/protocols/dispatcher.py Thu Apr 07 10:50:57 2016 +0200
|
|
@@ -212,7 +212,7 @@
|
|
logger.error(log_message, *log_args, exc_info=True)
|
|
raise
|
|
except (ConcurrencyException, UserError, UserWarning):
|
|
- logger.debug(log_message, *log_args, exc_info=True)
|
|
+ logger.warning(log_message, *log_args, exc_info=True)
|
|
raise
|
|
except Exception:
|
|
logger.error(log_message, *log_args, exc_info=True)
|
|
diff -r dfbbed6b42d5 trytond/protocols/jsonrpc.py
|
|
--- a/trytond/trytond/protocols/jsonrpc.py Thu Apr 07 00:04:01 2016 +0200
|
|
+++ b/trytond/trytond/protocols/jsonrpc.py Thu Apr 07 10:50:57 2016 +0200
|
|
@@ -9,6 +9,7 @@
|
|
except ImportError:
|
|
import json
|
|
import base64
|
|
+import logging
|
|
|
|
from werkzeug.wrappers import Response
|
|
from werkzeug.utils import cached_property
|
|
@@ -123,6 +124,10 @@
|
|
try:
|
|
return json.loads(self.decoded_data, object_hook=JSONDecoder())
|
|
except Exception:
|
|
+ exc_type, exc_value = sys.exc_info()[:2]
|
|
+ logger = logging.getLogger(__name__)
|
|
+ logger.warning('Exception while parsing json: %s (%s)\n %s'
|
|
+ % (exc_value, exc_type, traceback.format_exc()))
|
|
raise BadRequest('Unable to read JSON request')
|
|
else:
|
|
raise BadRequest('Not a JSON request')
|