I'm implementing an API using WCF and the specification says to return HTTP 429 in certain circumstances.
Normally I'd simply write:
throw new WebFaultException(HttpStatusCode.NotFound);
However the HttpStatusCode enum does not contain a 429.
I can obviously cast to the enum
throw new WebFaultException((HttpStatusCode)429);
However I'm worried that this will not produce the correct result to the application calling my API.
What's the best way to create extend the HttpStatusCode and send valid (but unsupported) HTTP statuses?