-
Notifications
You must be signed in to change notification settings - Fork 330
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
fix: respect user configuration for work with status codes #812
Conversation
I have already discussed this with @janbuchar. This PR should not introduce any breaking changes. If Status codes were previously discussed in PR: #498 However, we have differences with the JS version of Python:
JS:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two questions, otherwise LGTM... much better!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one last naming thing, otherwise LGTM.
Any ideas how we want to align it? I believe we do not have issue for that, correct? cc @janbuchar |
I believe apify/crawlee#812 tracks this. I also think that what we do in this PR is the correct way to handle things. The "success on 4xx" in JS is a crutch that prevented retries on such errors, and we can do that more cleanly now (in both implementations). How does the Python version handle 406 again? Can it be ignored via |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more thing - it looks like there are no tests for this behavior - could you add some? test_http_crawler would be an appropriate place I guess.
Description
Fixes HTTP status code configuration behavior:
additional_http_error_status_codes
: Properly triggers errors and retries when specified status codes are encounteredignore_http_error_status_codes
: Correctly treats specified error status codes as successful responsesIssues
ignored_http_status_codes
andSessionError
#708