Implementing correct handling of 403 and the other codes that should trigger a SessionError
After #812, we discussed with @janbuchar that currently the trigger for SessionError based on status codes is not working correctly. To be more precise, when using the http client, it doesn't trigger at all.
There are several points that need to be clarified in this case:
- Should
blocked_status_codesinSessionalways take priority over any error status codes inBaseHttpClientand trigger session rotation instead of request retry? - Should
additional_http_error_status_codesandignore_http_error_status_codesbe considered in theis_blocked_status_codemethod inSession, or should we only consider status codes defined inblocked_status_codesinSession?
Additionally: In PlaywrightCrawler, we have the opposite situation. Since we don't use an http client, we only have errors related to SessionError.