Skip to content

Commit fa4c391

Browse files
committed
Firebase response update.
Updated the Firebase SendAsync() error response so that it is ready to be used by the caller. Also added the error details section to the http response message.
1 parent 86b6af5 commit fa4c391

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CorePush/Firebase/FirebaseError.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22

33
public class FirebaseError
44
{
5+
public class Detail
6+
{
7+
public string Type { get; set; }
8+
public string ErrorCode { get; set; }
9+
}
10+
11+
public int Code { get; set; }
512
public string Message { get; set; }
613
public string Status { get; set; }
7-
public int Code { get; set; }
14+
public Detail[] Details { get; set; }
815
}

CorePush/Firebase/FirebaseSender.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public async Task<PushResult> SendAsync(object payload, CancellationToken cancel
108108
return new PushResult((int) response.StatusCode,
109109
response.IsSuccessStatusCode,
110110
firebaseResponse.Name ?? firebaseResponse.Error?.Message,
111-
responseString);
111+
firebaseResponse.Error?.Status);
112112
}
113113

114114
private async Task<string> GetJwtTokenAsync()

0 commit comments

Comments
 (0)