﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	launchpad_bug
646	CLI should report webapi errors better	warner		"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.
"	defect	closed	major	1.6.0	code-frontend-cli	1.3.0	fixed	web news-done		
