ServiceStack/ServiceStack — pull request #755 by robertbeal (2013-07-01 17:11:50+00:00)
Title: NotAcceptable exception

Hi,

I've made an NotAcceptableException (wasn't sure where best to put it, so placed it in the ServiceStack project).

We'd like a way, when making a Request Filter, to throw a new NotAcceptableException(*allowed types in here)

Then catch it during exception handling, and use the ToStatusCode extension method to provide the 406 value.

See if it makes sense, or if you know of a better way of doing so.

(Sorry for the line endings, I committed from Linux and had my git configured differently)