diff --git a/libs/SalesforceSDKCore/SalesforceSDKCore/Classes/RestAPI/SFRestAPI.m b/libs/SalesforceSDKCore/SalesforceSDKCore/Classes/RestAPI/SFRestAPI.m index 250770b376..b9d7a1ad9d 100644 --- a/libs/SalesforceSDKCore/SalesforceSDKCore/Classes/RestAPI/SFRestAPI.m +++ b/libs/SalesforceSDKCore/SalesforceSDKCore/Classes/RestAPI/SFRestAPI.m @@ -251,10 +251,6 @@ - (void)send:(SFRestRequest *)request requestDelegate:(id } failure:^(SFOAuthInfo *authInfo, NSError *error) { __strong typeof(weakSelf) strongSelf = weakSelf; [SFSDKCoreLogger e:[strongSelf class] format:@"Authentication failed in SFRestAPI: %@. Logging out.", error]; - NSMutableDictionary *attributes = [[NSMutableDictionary alloc] init]; - attributes[@"errorCode"] = [NSNumber numberWithInteger:error.code]; - attributes[@"errorDescription"] = error.localizedDescription; - [SFSDKEventBuilderHelper createAndStoreEvent:@"userLogout" userAccount:nil className:NSStringFromClass([strongSelf class]) attributes:attributes]; [[SFUserAccountManager sharedInstance] logout:SFLogoutReasonUnexpected]; }]; } else { @@ -447,7 +443,6 @@ - (void)replayRequest:(SFRestRequest *)request response:(NSURLResponse *)respons // Make sure we call logout on the main thread. dispatch_async(dispatch_get_main_queue(), ^{ - [strongSelf createAndStoreLogoutEvent:refreshError user:strongSelf.user]; [[SFUserAccountManager sharedInstance] logoutUser:strongSelf.user reason:SFLogoutReasonTokenExpired]; }); } @@ -490,13 +485,6 @@ - (void)notifyDelegateOfFailure:(id)delegate request:(SFR [self removeActiveRequestObject:request]; } -- (void)createAndStoreLogoutEvent:(NSError *)error user:(SFUserAccount*)user { - NSMutableDictionary *attributes = [[NSMutableDictionary alloc] init]; - attributes[@"errorCode"] = [NSNumber numberWithInteger:error.code]; - attributes[@"errorDescription"] = error.localizedDescription; - [SFSDKEventBuilderHelper createAndStoreEvent:@"userLogout" userAccount:user className:NSStringFromClass([self class]) attributes:attributes]; -} - #pragma mark - SFRestRequest factory methods - (SFRestRequest *)requestForUserInfo {