[tahoe-dev] [tahoe-lafs] #646: CLI should report webapi errors better
tahoe-lafs
trac at allmydata.org
Thu Feb 26 11:22:24 PST 2009
#646: CLI should report webapi errors better
-------------------------------+--------------------------------------------
Reporter: warner | Owner:
Type: defect | Status: new
Priority: major | Milestone: undecided
Component: code-frontend-cli | Version: 1.3.0
Keywords: web | Launchpad_bug:
-------------------------------+--------------------------------------------
Most of the filesystem-manipulating CLI tools display some frustratingly
useless error messages when something goes wrong. They all use the webapi
to contact the node, and the default webapi/Nevow exception-handling
response is to return an HTML representation of the exception traceback
(for use in a browser), as well as a 500 Internal Server Error. The CLI
tools, when they see 500, just dump the HTTP response body to stderr.
One tool that might help fix this is to identify the most likely sorts of
exceptions (!NotEnoughSharesError, !UnrecoverableFileError) and map them
into HTTP error codes. There is already some code to do this, in
web/common.py, but we could add more error types, and add tests to make
sure that we actually catch the errors in the right places.
Another tool that might help would be an extra flag (perhaps a request
header, like Accepts:) that tells the webapi server that we (a CLI client,
not a browser) want plain text tracebacks instead of HTML. This would at
least reduce the pages of impenetrable HTML on stderr to a dozen lines of
python stack trace.
--
Ticket URL: <http://allmydata.org/trac/tahoe/ticket/646>
tahoe-lafs <http://allmydata.org>
secure decentralized file storage grid
More information about the tahoe-dev
mailing list