Skip to content

Commit

Permalink
Fix rate limiting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Curd committed Nov 13, 2017
1 parent 32bceca commit fdbf9a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/UservoiceSDK/Client/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ public Configuration(ApiClient apiClient)
public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) =>
{
int status = (int) response.StatusCode;
if (status == 429) return new RateLimitException(status, String.Format("Error calling {0}: {1}", methodName, response.Content), response.Content);
if (status >= 400) return new ApiException(status, String.Format("Error calling {0}: {1}", methodName, response.Content), response.Content);
if (status == 0) return new ApiException(status, String.Format("Error calling {0}: {1}", methodName, response.ErrorMessage), response.ErrorMessage);
if (status == 429) return new RateLimitException(status, String.Format("Error calling {0}: {1}", methodName, response.Content), response.Content);
return null;
};

Expand Down

0 comments on commit fdbf9a4

Please sign in to comment.