         
         guard let statusCode = response.response?.statusCode else {
             
-            if let error = response.result.error {
-                
-                completionHandler(statusCode: error.code, data: response.data, error: error)
-            }
-            else {
-                completionHandler(statusCode: -1, data: nil, error: nil)
-            }
-            return
+            let error = response.result.error
+            
+            return completionHandler(statusCode: error?.code, data: response.data, error: error)
         }
         
         switch statusCode {

            return
        }
        
        guard !authenticationStrategy.isRefreshing else {
            
            if let task = task {


public protocol AuthenticationStrategy: class {
    
    var authenticationHeader: String { get set }
    var isRefreshing: Bool { get }
    var retries: Int { get set }
    var retriesLimit: Int { get }
    
    func refreshToken(completionHandler: (error :NSError?, token: String?) -> Void)
}
