Skip to content

Commit

Permalink
Enums are not integers when calling ToString. Cast needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenba committed Dec 8, 2014
1 parent 8b3fcbe commit 0f2e430
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SyntaxTree.FastSpring.Api/CompanyStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public async Task UpdateSubscriptionAsync(string reference, SubscriptionUpdate s
{
using (var response = (HttpWebResponse)await request.GetResponseAsync())
{
if (!response.StatusCode.ToString().StartsWith("2"))
if (!((int)response.StatusCode).ToString().StartsWith("2"))
{
throw new Exception(response.StatusDescription);
}
Expand Down Expand Up @@ -148,7 +148,7 @@ public async Task CancelSubscriptionAsync(string reference)
{
using (var response = (HttpWebResponse)await request.GetResponseAsync())
{
if (!response.StatusCode.ToString().StartsWith("2"))
if (!((int)response.StatusCode).ToString().StartsWith("2"))
{
throw new Exception(response.StatusDescription);
}
Expand Down

0 comments on commit 0f2e430

Please sign in to comment.