I'm doing some integration work with an API which returns a HttpStatusCode 429 when you've hit your daily limit. However the Enum HttpStatusCode in the web response object does not contain this code.
Can some one let me know how I can check for this response code?
Here is some code to show what I'm trying to accomplish:
try
{
//do something
}
catch (WebException webExp)
{
var response = (HttpWebResponse) webExp.Response;
//here I want to check status code for too many requests but it is not in the enum.
if (response.StatusCode == HttpStatusCode.TooManyRequests) throw webExp;
}