Use the dictionary for 404

Cleaning up the code to use the dictionary lookup.
This commit is contained in:
Haacked
2013-10-29 17:02:51 -07:00
parent ca052c83e0
commit 099db40dbd
+1 -5
View File
@@ -281,6 +281,7 @@ namespace Octokit
{
{ HttpStatusCode.Unauthorized, GetExceptionForUnauthorized },
{ HttpStatusCode.Forbidden, GetExceptionForForbidden },
{ HttpStatusCode.NotFound, response => new NotFoundException(response) },
{ (HttpStatusCode)422, response => new ApiValidationException(response) }
};
@@ -293,11 +294,6 @@ namespace Octokit
throw exceptionFunc(response);
}
if ((int)response.StatusCode == 404)
{
throw new NotFoundException(response);
}
if ((int)response.StatusCode >= 400)
{
throw new ApiException(response);