Skip to content

Commit 2f8843e

Browse files
author
Dominik Földi
committed
Remove INTERNAL_ERROR constant from FirebaseUserManager and use simple strings on exception
1 parent 7be1daf commit 2f8843e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

FirebaseAdmin/FirebaseAdmin/Auth/FirebaseUserManager.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ namespace FirebaseAdmin.Auth
2929
/// </summary>
3030
internal class FirebaseUserManager : IDisposable
3131
{
32-
private const string INTERNAL_ERROR = "internal-error";
33-
3432
private const string ID_TOOLKIT_URL = "https://identitytoolkit.googleapis.com/v1/projects/{0}";
3533

3634
private readonly ConfigurableHttpClient _httpClient;
@@ -57,12 +55,12 @@ public async Task UpdateUserAsync(UserRecord user)
5755
var userResponse = resopnse.ToObject<UserRecord>();
5856
if (userResponse.Uid != user.Uid)
5957
{
60-
throw new FirebaseException(INTERNAL_ERROR);
58+
throw new FirebaseException($"Failed to update user: {user.Uid}");
6159
}
6260
}
63-
catch (Exception)
61+
catch (Exception e)
6462
{
65-
throw new FirebaseException(INTERNAL_ERROR);
63+
throw new FirebaseException("Error while calling Firebase Auth service", e);
6664
}
6765
}
6866

0 commit comments

Comments
 (0)