diff options
author | Chen Liang <chliang@google.com> | 2018-04-02 16:34:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-02 16:34:54 -0700 |
commit | dfc7d5e5fa1966ba3b08ec9eed70d940ab987e6b (patch) | |
tree | f27382683633374531fd23c40c43ce8a05f15d32 /Firebase/Messaging/FIRMessagingTopicOperation.m | |
parent | c46e7f2928f9af3ad7767d072d6c9d4d8ad81012 (diff) |
improve logging when subscription failed (#1017)
Diffstat (limited to 'Firebase/Messaging/FIRMessagingTopicOperation.m')
-rw-r--r-- | Firebase/Messaging/FIRMessagingTopicOperation.m | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Firebase/Messaging/FIRMessagingTopicOperation.m b/Firebase/Messaging/FIRMessagingTopicOperation.m index 1546d47..6703178 100644 --- a/Firebase/Messaging/FIRMessagingTopicOperation.m +++ b/Firebase/Messaging/FIRMessagingTopicOperation.m @@ -226,6 +226,8 @@ NSString *FIRMessagingSubscriptionsServer() { } NSString *response = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; if (response.length == 0) { + FIRMessagingLoggerDebug(kFIRMessagingMessageCodeTopicOperationEmptyResponse, + @"Invalid registration response - zero length."); [self finishWithError:[NSError errorWithFCMErrorCode:kFIRMessagingErrorCodeUnknown]]; return; } @@ -233,7 +235,7 @@ NSString *FIRMessagingSubscriptionsServer() { _FIRMessagingDevAssert(parts.count, @"Invalid registration response"); if (![parts[0] isEqualToString:@"token"] || parts.count <= 1) { FIRMessagingLoggerDebug(kFIRMessagingMessageCodeTopicOption002, - @"Invalid registration request, response"); + @"Invalid registration response %@", response); [self finishWithError:[NSError errorWithFCMErrorCode:kFIRMessagingErrorCodeUnknown]]; return; } |