Skip to content

Commit 0ce3ee5

Browse files
committed
Merge branch 'hkj-fcm-errors' of github.com:firebase/firebase-admin-dotnet into hkj-fcm-errors
2 parents 0774b2a + a2c62e8 commit 0ce3ee5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

FirebaseAdmin/FirebaseAdmin.Tests/Messaging/FirebaseMessagingClientTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ public class FirebaseMessagingClientTest
3434
public void NoProjectId()
3535
{
3636
var clientFactory = new HttpClientFactory();
37-
Assert.Throws<FirebaseException>(
37+
Assert.Throws<ArgumentException>(
3838
() => new FirebaseMessagingClient(clientFactory, MockCredential, null));
39-
Assert.Throws<FirebaseException>(
39+
Assert.Throws<ArgumentException>(
4040
() => new FirebaseMessagingClient(clientFactory, MockCredential, string.Empty));
4141
}
4242

FirebaseAdmin/FirebaseAdmin/Messaging/AndroidConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ private string PriorityString
9797
this.Priority = Messaging.Priority.High;
9898
return;
9999
default:
100-
throw new FirebaseException(
100+
throw new ArgumentException(
101101
$"Invalid priority value: {value}. Only 'high' and 'normal'"
102102
+ " are allowed.");
103103
}

FirebaseAdmin/FirebaseAdmin/Messaging/FirebaseMessagingClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public FirebaseMessagingClient(
4949
{
5050
if (string.IsNullOrEmpty(projectId))
5151
{
52-
throw new FirebaseException(
52+
throw new ArgumentException(
5353
"Project ID is required to access messaging service. Use a service account "
5454
+ "credential or set the project ID explicitly via AppOptions. Alternatively "
5555
+ "you can set the project ID via the GOOGLE_CLOUD_PROJECT environment "
@@ -83,7 +83,7 @@ internal static string ClientVersion
8383
/// <exception cref="ArgumentNullException">If the message argument is null.</exception>
8484
/// <exception cref="ArgumentException">If the message contains any invalid
8585
/// fields.</exception>
86-
/// <exception cref="FirebaseException">If an error occurs while sending the
86+
/// <exception cref="FirebaseMessagingException">If an error occurs while sending the
8787
/// message.</exception>
8888
/// <param name="message">The message to be sent. Must not be null.</param>
8989
/// <param name="dryRun">A boolean indicating whether to perform a dry run (validation

0 commit comments

Comments
 (0)