Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eb_kwargs for errback #4598

Closed
Shleif91 opened this issue May 27, 2020 · 4 comments · Fixed by #4634
Closed

eb_kwargs for errback #4598

Shleif91 opened this issue May 27, 2020 · 4 comments · Fixed by #4634

Comments

@Shleif91
Copy link

Shleif91 commented May 27, 2020

Since version 2.0 cb_kwargs has appeared which I use to transfer data to callback.

Now need to handle errors in errback. How to forward data there (logically there should be eb_kwargs, but there is none)?

@elacuesta
Copy link
Member

elacuesta commented May 27, 2020

The original PR (#3563) briefly mentions this. We decided there was no need, since the original request is available in the errback's failure, so the callback arguments can be accessed through failure.request.cb_kwargs

@Shleif91
Copy link
Author

Shleif91 commented Jun 5, 2020

Thanks for the answer. Did as you showed. Perhaps you need to mention this in the documentation?

@Gallaecio
Copy link
Member

Gallaecio commented Jun 14, 2020

I guess it makes sense to be more specific about this in https://docs.scrapy.org/en/latest/topics/request-response.html#scrapy.http.Request.cb_kwargs

@dsandeep0138
Copy link
Contributor

dsandeep0138 commented Jun 17, 2020

@Gallaecio I have updated the docs. Can you please review the pull request and provide feedback? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants