Add support for specifying HTTP status codes on errors.

Review Request #1366 — Created Jan. 28, 2010 and submitted

Information

Djblets

Reviewers

Add support for specifying HTTP status codes on errors.

This change introduces proper HTTP status codes for the various errors we
send out.

This will break backwards-compatibility if a client assumes that every error
type is going to be a 200 OK. It's a bad assumption in general, but sadly,
is made in post-review (which will soon be fixed).

 
david
  1. 
      
  2. 
      
DB
  1. definitely want this!
  2. djblets/webapi/core.py (Diff revision 1)
     
     
    wouldn't explicitly raising an AssertionError be more clear?
  3. djblets/webapi/errors.py (Diff revision 1)
     
     
    yay!  new-style class!
  4.