Skip to content
Snippets Groups Projects

Attach traceback in jussi interal error

Closed Dariusz Kędzierski requested to merge dk-attach-traceback-in-jussi-interal-error into autoclave
1 unresolved thread

Proposal: Change default: log_traceback from False to True to allow more information in error messages.

Cons: Potential leak of internal jussi data that we don't want to show

@gandalf @dan what do you think?

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    • 1a3ef2ab - Change default: log_traceback from False to True

    Compare with previous version

    • 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"}

    • Please register or sign in to reply
  • added 1 commit

    • 713a7360 - Added --log_traceback program option

    Compare with previous version

  • added 4 commits

    Compare with previous version

  • Dan Notestein mentioned in commit 2e87ef6b

    mentioned in commit 2e87ef6b

  • closed

Please register or sign in to reply
Loading