"Fault 8002" when pushing a branch to an unregistered project
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Medium
|
James Henstridge |
Bug Description
As reported on the Bazaar mailing list:
John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I just tried to push to the wrong location and I got this:
> % bzr push bzr+ssh:
> bzr: ERROR: Generic bzr smart protocol error: <Fault 8002: 'error'>
>
> versus
>
> % bzr push sftp://
> bzr: ERROR: Permission denied: "/~bzr/
> Directories directly under a user directory must be named after a project name
> registered in Launchpad <https:/
>
> Fault 8002: doesn't really help figure out what I did wrong, but the sftp error
> message does.
>
> I know there was quite a bit of work done for the sftp server to report nice
> error messages. It would be nice if that could carry over to bzr+ssh.
This is almost certainly the fault of Launchpad, not the bzr+ssh code in Bazaar.
“Fault 8002” is probably an XML-RPC error on the server-side that isn't getting
caught and reported properly by bazaar.
-Andrew.
Changed in launchpad-bazaar: | |
assignee: | nobody → thumper |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in launchpad-bazaar: | |
assignee: | thumper → jamesh |
After investigating this, the <Fault 8002: 'error'> bit is what twisted.web.xmlrpc returns if a non-Fault exception gets raised. So in principle we can pass useful error messages back to the client, which is good.
After a bit of experimentation, the actual fault looks like a database integrity error. The XML-RPC method looks up the product, then creates a branch with that user, product and branch name.
Unfortunately, the product lookup returns None, so it ends up creating a +junk branch instead. On the next operation, it will look up the branch and find it doesn't exist and try to create it again. This then fails because the branch already exists (albeit in a different location).
The fix is to make the XML-RPC method return an appropriate fault if the product does not exist.