                     // http header must be updated with new OAuth token.
                     request.setOAuth2Token(token)
                     let task = self.URLSession.dataTaskWithRequest(request, completionHandler: { (data: NSData?, response: NSURLResponse?, error: NSError?) -> Void in
-                        let result = closure(data:data, response: response, error: error)
-                        completion(result)
+                        completion(handleResponse(data:data, response: response, error: error))
                     })
                     task.resume()
                 }

     Executes the passed task after refreshing the current OAuth token.
     
     - parameter request: To be written.
     - parameter closure: To be written.
     - parameter completion: To be written.
     */
    func executeTaskAgainAfterRefresh<T>(request: NSMutableURLRequest, closure: (data: NSData?, response: NSURLResponse?, error: NSError?) -> Result<T>, completion: (Result<T>) -> Void) -> Void {
        do {
            try self.refreshToken({ (result) -> Void in
                switch result {

     - parameter request: To be written.
     - parameter closure: To be written.
     - parameter completion: To be written.
     - returns: Data task which requests search to reddit.com.
     */
    func executeTask<T>(request: NSMutableURLRequest, handleResponse: ((data: NSData?, response: NSURLResponse?, error: NSError?) -> Result<T>), completion: ((Result<T>) -> Void)) -> NSURLSessionDataTask {
        let task = URLSession.dataTaskWithRequest(request, completionHandler: { (data: NSData?, response: NSURLResponse?, error: NSError?) -> Void in
            let result = handleResponse(data:data, response: response, error: error)
            switch result {
            case .Failure(let error):
                guard let token = self.token else { completion(result); return; }
                if !token.refreshToken.isEmpty && error.code == 401 {
                    self.executeTaskAgainAfterRefresh(request, handleResponse: handleResponse, completion: completion)
                } else {
                    completion(result)
                }
            case .Success:
                completion(result)
            }
        })
        task.resume()
