Clarify that Scrapy sets Failure.request

This commit is contained in:
Adrian Chaves 2026-08-06 06:43:51 +02:00
parent 0c89e87b18
commit 2859b7697b
1 changed files with 5 additions and 1 deletions

View File

@ -765,11 +765,15 @@ Errbacks
========
The errback of a request is a function that will be called when an exception
is raise while processing it.
is raised while processing it.
It receives a :exc:`~twisted.python.failure.Failure` as first parameter and can
be used to track connection establishment timeouts, DNS errors etc.
Scrapy sets the ``request`` attribute of that
:exc:`~twisted.python.failure.Failure` object to the :class:`~scrapy.Request`
object being processed.
Here's an example spider logging all errors and catching some specific
errors if needed: