'stop the request from returning objects and records any errors'

def _clean_req(self, request, method, results):

    cb = request.callback
    @wraps(cb)
    def cb_wrapper(response):
        try:
            output = cb(response)
            output = list(iterate_spider_output(output))
        except:
            case = _create_testcase(method, 'callback')
            results.addError(case, sys.exc_info())
    def eb_wrapper(failure):
        case = _create_testcase(method, 'errback')
        exc_info = (failure.value, failure.type, failure.getTracebackObject())
        results.addError(case, exc_info)
    request.callback = cb_wrapper
    request.errback = eb_wrapper
