Skip to content

Commit 4f5b117

Browse files
committed
Adding additional details to the error message when available (#129)
1 parent 74f7214 commit 4f5b117

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

messaging/messaging.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,8 @@ func (c *Client) makeSendRequest(ctx context.Context, req *fcmRequest) (string,
572572
} else {
573573
clientCode = unknownError
574574
msg = fmt.Sprintf("server responded with an unknown error; response: %s", string(resp.Body))
575+
} else if fe.Error.Message != "" {
576+
msg += "; details: " + fe.Error.Message
575577
}
576578
if fe.Error.Message != "" {
577579
msg += "; details: " + fe.Error.Message

0 commit comments

Comments
 (0)