Attach traceback in jussi interal error
Merge request reports
Activity
added 1 commit
- 1a3ef2ab - Change default: log_traceback from False to True
It's not something I would like to see on production because it returns traceback to client, client don't have to see this as it's most likely anything useful for them. Improving logging however would help (to see traceback in logs when needed) Side effect of about change would be to have all Timeout's (that are by the way incorrectly returned to clients as internal errors) to have traceback, significantly increasing amount of transferred data without any useful information there.
Ideally, please add that as a runtime-switch.
Done. Added
--log_traceback
option. When enabled exception traceback will be logged by jussi. Trackback info will not be shown in response body.I.e. Jussi exec:
python3 -m jussi.serve --server_host 127.0.0.1 --server_port 9000 --debug true --upstream_config_file config.json --log_traceback true
Call:
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.list_comments", "params":{"start":["tester001", ""], "order":"by_permlink", "limit":1, d}, "id":1}' 127.0.0.1:9000
Response:
{"jsonrpc":"2.0","id":null,"error":{"code":-32700,"message":"Parse error","data":{"error_id":"2af58b22-d138-44b2-896b-ce8d476e2cad","jussi_request_id":"000329701582839811"}}}
Jussi log:
{"message":"Parse error","error_id":"2af58b22-d138-44b2-896b-ce8d476e2cad","jrpc_request_id":null,"jussi_request_id":"000857745004590705","event":"Parse error","logger":"jussi.errors","level":"error","exception":"Traceback (most recent call last):\n File \"/mnt/storage-hdd-2/Sources/jussi/jussi/request/http.py\", line 90, in jsonrpc\n self._parsed_json = json_loads(self.body)\nValueError: Expected object or value"}
added 4 commits
-
713a7360...75f61aaf - 3 commits from branch
autoclave
- 0e40eb3c - Rebase to current autoclave
-
713a7360...75f61aaf - 3 commits from branch
mentioned in commit 2e87ef6b