Skip to content

Commit ea9e351

Browse files
author
Leo
committed
PR requetc changes
1 parent 0724927 commit ea9e351

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

FirebaseAdmin/FirebaseAdmin/Messaging/InstanceIdClient.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,6 @@ private async Task<TopicManagementResponse> SendInstanceIdRequest(string topic,
112112
var json = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
113113
this.errorHandler.ThrowIfError(response, json);
114114
var instanceIdServiceResponse = JsonConvert.DeserializeObject<InstanceIdServiceResponse>(json);
115-
116-
if (instanceIdServiceResponse == null || instanceIdServiceResponse.ResultCount == 0)
117-
{
118-
throw new ArgumentException("unexpected response from topic management service");
119-
}
120-
121115
return new TopicManagementResponse(instanceIdServiceResponse);
122116
}
123117
catch (HttpRequestException e)
@@ -161,7 +155,7 @@ private void ValidateRegistrationTokenList(List<string> registrationTokens)
161155
{
162156
if (string.IsNullOrEmpty(registrationToken))
163157
{
164-
throw new ArgumentNullException("Registration tokens must not be null");
158+
throw new ArgumentException("Registration tokens must not be null or empty");
165159
}
166160
}
167161
}

FirebaseAdmin/FirebaseAdmin/Messaging/InstanceIdServiceResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ internal class InstanceIdServiceResponse
2929
/// <summary>
3030
/// An instance Id response error.
3131
/// </summary>
32-
public class InstanceIdServiceResponseElement
32+
internal class InstanceIdServiceResponseElement
3333
{
3434
/// <summary>
3535
/// Gets a value indicating the error in this element of the response array. If this is empty this indicates success.

0 commit comments

Comments
 (0)