Skip to content

fix: call error_handler for SessionError#557

Merged
vdusek merged 3 commits into
masterfrom
fix-error-handler-for-session-errors
Oct 1, 2024
Merged

fix: call error_handler for SessionError#557
vdusek merged 3 commits into
masterfrom
fix-error-handler-for-session-errors

Conversation

@vdusek

@vdusek vdusek commented Sep 30, 2024

Copy link
Copy Markdown
Collaborator

Closes: #546

@vdusek vdusek requested a review from janbuchar September 30, 2024 17:26
@github-actions github-actions Bot added this to the 99th sprint - Tooling team milestone Sep 30, 2024
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Sep 30, 2024
@vdusek vdusek changed the title fix: call error handler for session errors Sep 30, 2024

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Pull Request Tookit has failed!

None of the pull request and linked issue has estimate

Comment thread src/crawlee/basic_crawler/_basic_crawler.py Outdated
@vdusek vdusek requested a review from janbuchar October 1, 2024 08:14
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label Oct 1, 2024
raise RuntimeError('SessionError raised in a crawling context without a session') from session_error

if self._error_handler:
await self._error_handler(crawling_context, session_error)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that I think of it, for regular (non-SessionError) failures we also handle the case when this throws as well.

@vdusek vdusek merged commit e75ac4b into master Oct 1, 2024
@vdusek vdusek deleted the fix-error-handler-for-session-errors branch October 1, 2024 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

2 participants