Comment 4 for bug 1461140

Revision history for this message
Joanna Taryma (jtaryma) wrote :

After reading the mentioned discussion, I implemented a new exception type Locked, that shall set code to 423 (http_client.LOCKED) in case a resource is locked.

However, in in pecan does not accept 423 as valid response - it is not contained in six.moves.http_client.responses and it returns 500 instead (with a valid message, though).

Maybe 412 can do the job?

Full list of supported 400 codes:
400: 'Bad Request',
401: 'Unauthorized',
402: 'Payment Required',
403: 'Forbidden',
404: 'Not Found',
405: 'Method Not Allowed',
406: 'Not Acceptable',
407: 'Proxy Authentication Required',
408: 'Request Timeout',
409: 'Conflict',
410: 'Gone',
411: 'Length Required',
412: 'Precondition Failed',
413: 'Request Entity Too Large',
414: 'Request-URI Too Long',
415: 'Unsupported Media Type',
416: 'Requested Range Not Satisfiable',
417: 'Expectation Failed'