                 objc_sync_exit(self)
             }
         }
-
-        
-        let performNetworking = { (request: NSURLRequest) in
-            if cancellableToken.isCancelled { return }
+        
+        
+        let performNetworking = { (requestResult: Result<NSURLRequest, NSError>) in
+            guard case .Success(let request) = requestResult
+                where !cancellableToken.isCancelled else { return }
             
             switch stubBehavior {
             case .Never:


public enum StructTarget: TargetType {
    case Struct(TargetType)

    public init(_ target: TargetType) {
        self = StructTarget.Struct(target)
    }

    public var path: String {
        return target.path
    }

    public var baseURL: NSURL {
        return target.baseURL
    }

    public var method: Moya.Method {
        return target.method
    }

    public var parameters: [String: AnyObject]? {
        return target.parameters
    }

    public var sampleData: NSData {
        return target.sampleData
    }

    public var target: TargetType {
        switch self {
        case .Struct(let t): return t

            plugins.forEach { $0.didReceiveResponse(result, target: target) }
            completion(result: result)
        }
        
        alamoRequest.resume()
        
        return CancellableToken(request: alamoRequest)
    }
    
