implementing new 4xx codes

2007-08-07 @ 23:36#

i've decided to implement some new HTTP Status Codes for the exyus framework.

422 - Cannot Process Entity
when the schema validator fails or the supplied EntityBody is bad
424 - Failed Dependency
when the database cannot complete the requested action

i'm bummed that the .NET framework does not have these already pre-defined in the enumeration for HttpStatusCode. that means the expected string ('Failed Dependency') does not pass through. Instead users will only see the 424 number. bummer.

i might re-think this, but i like the idea of keeping to the standard codes. esp. in cases where pipelining requests (nesting within the code) will result in only the HTTP Status Code and not any friendly text message (yeah, i'm working on that, too).

code