         return nil
     }
     
-    init(status: Int, data: NSData?, request: Request) {
+    init(status: Int = 0, data: NSData? = nil, request: Request, error: NSError? = nil) {
         self.status = status
         self.data = data
         self.request = request
+        self.error = error
     }
 }
 

            var allow: Bool?
            
            if challenge.previousFailureCount > 0 {
                completionHandler(NSURLSessionAuthChallengeDisposition.CancelAuthenticationChallenge, nil)
                return
            }
            

            Ladybug.pendingRequests[request.id] = nil
            NSURLProtocol.removePropertyForKey(Constants.LadybugURLProperty, inRequest: req)
            
            let res: Response
            if let httpResponse = response as? NSHTTPURLResponse {
                res = Response(status: httpResponse.statusCode, data: data, request: request, error: error)
            } else {
                res = Response(request: request, error: error)
            }
            
            dispatch_async(dispatch_get_main_queue(), {
                request.done?(res)
                Ladybug.done?(res)
            })
        })
        
        task.resume()
