Skip to content

fix: cancel requests only in standby #68

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

Merged
merged 4 commits into from
Mar 27, 2025
Merged

Conversation

MQ37
Copy link
Contributor

@MQ37 MQ37 commented Mar 27, 2025

No description provided.

@MQ37 MQ37 requested a review from Copilot March 27, 2025 20:18
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the issue of canceling crawling requests when the actor is in standby mode.

  • Added a new utility function, isActorStandby, to detect standby mode.
  • Revised request handlers to cancel requests in standby mode using the new checkTimeoutAndCancelRequest function.
  • Updated the export of responseData and adjusted error messages for consistency.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/utils.ts Added isActorStandby function to check if actor is in standby mode
src/responses.ts Exported responseData and standardized timeout error message
src/request-handler.ts Added checkTimeoutAndCancelRequest for cancelling requests in standby, updated request handling
src/main.ts Replaced direct metaOrigin check with isActorStandby in main entry
CHANGELOG.md Updated changelog with new version and bug fix detail
Comments suppressed due to low confidence (1)

src/request-handler.ts:42

  • Consider standardizing the timeout error messages across the project. For example, align this error message with the one in responses.ts for better consistency.
throw new Error('Timed out. Cancelling the request...');

@MQ37 MQ37 merged commit ef56aac into master Mar 27, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant