#1047 new enhancement

Upload failures should report useful HTTP status lines

Reported by: kpreid Owned by: nobody
Priority: major Milestone: undecided
Component: code-frontend-web Version: 1.6.1
Keywords: error http usability transparency Cc: kpreid
Launchpad Bug:

Description

iCal, and perhaps other HTTP-PUT publishing applications, reports only the HTTP status line when the publishing upload fails:

Request for http://dummy@127.0.0.1:9797/uri/URI:DIR2:<redacted>/<redacted>.ics failed.

The server responded with
"HTTP/1.1 500 Internal Server Error"

The actual error was:

allmydata.interfaces.UploadUnhappinessError?: shares could be placed on only 5 server(s) such that any 3 of them have enough shares to recover the file, but we were asked to place shares on at least 7 such servers. (placed all 10 shares, want to place shares on at least 7 servers such that any 3 of them have enough shares to recover the file, sent 14 queries to 9 peers, 10 queries placed some shares, 4 placed none (of which 4 placed none due to the server being full and 0 placed none due to an error))

Therefore, the routine which catches and displays this error as the response body should also set the HTTP status code to the most appropriate code for the error (for UploadUnhappinessError?, probably 503 Service Unavailable), and set the status text to an abbreviated form of the error message; say "Could not place sufficient shares because servers are full".

Change History (3)

comment:1 Changed at 2010-05-19T00:34:19Z by kpreid

  • Component changed from unknown to code-frontend-web

comment:2 Changed at 2010-06-13T00:58:30Z by davidsarah

  • Keywords http added

comment:3 Changed at 2011-03-17T18:10:48Z by zooko

  • Keywords usability transparency added
Note: See TracTickets for help on using tickets.