Skip to content

Commit 8f7e163

Browse files
committed
Fixed wrong method name in downloader middleware documentation
1 parent 74413ff commit 8f7e163

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/topics/downloader-middleware.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ single Python class that defines one or more of the following methods:
114114
:param spider: the spider for which this response is intended
115115
:type spider: :class:`~scrapy.spider.BaseSpider` object
116116

117-
.. method:: process_download_exception(request, exception, spider)
117+
.. method:: process_exception(request, exception, spider)
118118

119-
Scrapy calls :meth:`process_download_exception` when a download handler
119+
Scrapy calls :meth:`process_exception` when a download handler
120120
or a :meth:`process_request` (from a downloader middleware) raises an
121121
exception.
122122

123-
:meth:`process_download_exception` should return either ``None``,
123+
:meth:`process_exception` should return either ``None``,
124124
:class:`~scrapy.http.Response` or :class:`~scrapy.http.Request` object.
125125

126126
If it returns ``None``, Scrapy will continue processing this exception,
@@ -133,7 +133,7 @@ single Python class that defines one or more of the following methods:
133133
If it returns a :class:`~scrapy.http.Request` object, the returned request is
134134
used to instruct an immediate redirection.
135135
The original request won't finish until the redirected
136-
request is completed. This stops the :meth:`process_download_exception`
136+
request is completed. This stops the :meth:`process_exception`
137137
middleware the same as returning Response would do.
138138

139139
:param request: the request that generated the exception

0 commit comments

Comments
 (0)