     func updateContentsFromServerUseInitiateRequest(userDidInitiateRequest: Int) {
         POSAPIManager.sharedManager().updateRootResourceWithSuccess({ () -> Void in
             }, failure: { (error: NSError!) -> Void in
-                let key = AFNetworkingOperationFailingURLRequestErrorKey
                 
-                let response =  error.userInfo![key] as NSHTTPURLResponse
-                
-                if response.isKindOfClass(NSHTTPURLResponse) {
-                    if (POSAPIManager.sharedManager().responseCodeIsUnauthorized(response)) {
-                     NSTimer.scheduledTimerWithTimeInterval(0.0, target: userDidInitiateRequest, selector: "updateContentsFromServerUserInitiatedRequest", userInfo: nil, repeats: false)
-                        return
+                if let e = error {
+                    let key = AFNetworkingOperationFailingURLRequestErrorKey
+                    
+                    let response =  e.userInfo![key] as NSHTTPURLResponse
+                    
+                    if response.isKindOfClass(NSHTTPURLResponse) {
+                        if (POSAPIManager.sharedManager().responseCodeIsUnauthorized(response)) {
+                            NSTimer.scheduledTimerWithTimeInterval(0.0, target: userDidInitiateRequest, selector: "updateContentsFromServerUserInitiatedRequest:", userInfo: nil, repeats: false)
+                            return
+                        }
                     }
                 }
         })

            
            showingItem.title = title
        }
        
        
        self.navigationItem.setHidesBackButton(true, animated: false)
        self.navigationItem.backBarButtonItem = nil

        firstVC.navigationItem.titleView = nil
        
        if UIDevice.currentDevice().userInterfaceIdiom == .Pad {
            if let rootResource: POSRootResource = POSRootResource.existingRootResourceInManagedObjectContext(POSModelManager.sharedManager().managedObjectContext) {
                if rootResource == true {
                    self.performSegueWithIdentifier("gotoDocumentsFromAccountsSegue", sender: self)
                }
            }
            
        }
        

