Opened at 2024-09-10T20:29:51Z
#4107 new enhancement
UI/representation of errors (tracebacks) in the CLI client
Reported by: | hacklschorsch | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | undecided |
Component: | unknown | Version: | n/a |
Keywords: | Cc: | ||
Launchpad Bug: |
Description
Similar to #4106, when I try to create a directory with a client that isn't connected to enough servers, instead of an understandable error message I get a misformatted stack trace (no line breaks):
tahoe create-alias --node-url='http://127.0.0.1:3457' tahoe
"Error during HTTP request: 500 Internal Server Error b'Traceback (most recent call last):\\n File \"/home/flo/Repositories/tahoe-lafs/venv3/lib/python3.11/site-packages/twisted/internet/defer.py\", line 1960, in _gotResultInlineCallbacks\\n _inlineCallbacks(r, gen, status, context)\\n File \"/home/flo/Repositories/tahoe-lafs/venv3/lib/python3.11/site-packages/twisted/internet/defer.py\", line 2112, in _inlineCallbacks\\n status.deferred.callback(callbackValue)\\n File \"/home/flo/Repositories/tahoe-lafs/venv3/lib/python3.11/site-packages/twisted/internet/defer.py\", line 873, in callback\\n self._startRunCallbacks(result)\\n File \"/home/flo/Repositories/tahoe-lafs/venv3/lib/python3.11/site-packages/twisted/internet/defer.py\", line 980, in _startRunCallbacks\\n self._runCallbacks()\\n--- <exception caught here> ---\\n File \"/home/flo/Repositories/tahoe-lafs/venv3/lib/python3.11/site-packages/twisted/internet/defer.py\", line 1074, in _runCallbacks\\n current.result = callback( # type: ignore[misc]\\n File \"/home/flo/Repositories/tahoe-lafs/venv3/lib/python3.11/site-packages/allmydata/mutable/filenode.py\", line 152, in create_with_keys\\n return self._upload(initial_contents, None)\\n File \"/home/flo/Repositories/tahoe-lafs/venv3/lib/python3.11/site-packages/allmydata/mutable/filenode.py\", line 685, in _upload\\n d = p.publish(new_contents)\\n File \"/home/flo/Repositories/tahoe-lafs/venv3/lib/python3.11/site-packages/allmydata/mutable/publish.py\", line 474, in publish\\n self.update_goal()\\n File \"/home/flo/Repositories/tahoe-lafs/venv3/lib/python3.11/site-packages/allmydata/mutable/publish.py\", line 996, in update_goal\\n raise NotEnoughServersError(\"Ran out of non-bad servers, \"\\nallmydata.mutable.common.NotEnoughServersError: (\\'Ran out of non-bad servers, first_error=None\\', None)\\n'"
While I would prefer a human-readable error message instead of a stack trace for common problems, I'd be content (and accept as solution) a change that breaks lines on the stack trace.
Attachments (1)
Note: See
TracTickets for help on using
tickets.
Screenshot of my terminal emulator with the tahoe client CLI showing the error that one gets when not connected to enough servers