We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1d82e2 commit 33d0adeCopy full SHA for 33d0ade
iOS_SDK/OneSignalSDK/Source/OneSignalClient.m
@@ -395,7 +395,9 @@ - (void)handleJSONNSURLResponse:(NSURLResponse*)response data:(NSData*)data erro
395
successBlock(nil);
396
}
397
} else if (failureBlock != nil) {
398
- if (innerJson != nil && error == nil)
+ if (innerJson != nil && error != nil)
399
+ failureBlock([NSError errorWithDomain:@"OneSignalError" code:statusCode userInfo:@{@"returned" : innerJson, @"error": error}]);
400
+ else if (innerJson != nil)
401
failureBlock([NSError errorWithDomain:@"OneSignalError" code:statusCode userInfo:@{@"returned" : innerJson}]);
402
else if (error != nil)
403
failureBlock([NSError errorWithDomain:@"OneSignalError" code:statusCode userInfo:@{@"error" : error}]);
0 commit comments