title: How to get response status code on process_exception in Scrapy?
body: <p>I want to retry Scrapy request when if it gets an exception and the response status code is 429. The problem is I don't know how to get the response status on the <code>process_exception</code>. How can I do it since it seems there is no way to access response object inside <code>process_exception</code>?</p>
  
  <pre><code>class FakeUserAgentErrorRetryMiddleware(RetryMiddleware):
  
      def process_exception(self, request, exception, spider):
          if type(exception) == FakeUserAgentError: return self._retry(request, exception, spider)
  </code></pre>