Skip to content

Commit

Permalink
fxied after merge errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-efremov committed May 10, 2016
1 parent e9ff1eb commit 23191be
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions Octokit.Reactive/Clients/ObservableOrganizationMembersClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,22 +166,7 @@ public IObservable<bool> CheckMember(string org, string user)
Ensure.ArgumentNotNullOrEmptyString(org, "org");
Ensure.ArgumentNotNullOrEmptyString(user, "user");

try
{
var response = await Connection.Get<object>(ApiUrls.CheckMember(org, user), null, null).ConfigureAwait(false);
var statusCode = response.HttpResponse.StatusCode;
if (statusCode != HttpStatusCode.NotFound
&& statusCode != HttpStatusCode.NoContent
&& statusCode != HttpStatusCode.Found)
{
throw new ApiException("Invalid Status Code returned. Expected a 204, a 302 or a 404", statusCode);
}
return statusCode == HttpStatusCode.NoContent;
}
catch (NotFoundException)
{
return false;
}
return _client.CheckMember(org, user).ToObservable();
}

/// <summary>
Expand Down

0 comments on commit 23191be

Please sign in to comment.