8000 fix: unhandled exceptions causing crash loops by NatanTechofNY · Pull Request #893 · algolia/renderscript · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: unhandled exceptions causing crash loops #893

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 14 commits into from
Apr 7, 2025
Merged

Conversation

NatanTechofNY
Copy link
Contributor
@NatanTechofNY NatanTechofNY commented Apr 3, 2025
  1. Improved Error Handling in Task Execution:

    • Changed how errors are caught and classified during task execution, particularly focusing on "Target page, context or browser has been closed" errors.
    • These errors were previously causing container restarts because they were unhandled.
  2. Added Error Classification:

    • Added logic to classify certain errors as 'page_closed_too_soon' when they match patterns in RESPONSE_IGNORED_ERRORS.
    • This allows us to handle these errors gracefully instead of letting them crash the application.
  3. Fixed Redirection Handling:

    • Identified that our new error handling was incorrectly classifying JavaScript redirects as page closed errors.
    • Added a check to first see if a redirection has occurred before classifying an error as 'page_closed_too_soon'.
  4. API Route Improvements:

    • Updated both render.ts and login.ts to ensure that even if a redirection is in the retryable errors list, it still returns a 200 status code.
    • This was done by adding the condition task.error !== 'redirection' to the status code determination.
  5. Error Propagation Control:

    • Ensured that errors are properly propagated with the right classification, which helps in debugging and maintaining consistent behavior.

@NatanTechofNY NatanTechofNY self-assigned this Apr 3, 2025
@NatanTechofNY NatanTechofNY changed the title Fix for response headers Fix for unhandled exceptions which cause container restarts and crash loops Apr 3, 2025
@dylantientcheu dylantientcheu changed the title Fix for unhandled exceptions which cause container restarts and crash loops fix: unhandled exceptions causing crash loops Apr 3, 2025
Copy link
Contributor
@dylantientcheu dylantientcheu left a comment

Choose a reason for hiding this comment

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

✅ tested, trusted & approved.

I added a last check for an issue with the request response.

@dylantientcheu dylantientcheu merged commit f85ba34 into master Apr 7, 2025
2 checks passed
@dylantientcheu dylantientcheu deleted the fix/fix_catch branch April 7, 2025 10:49
algolia-bot added a commit that referenced this pull request Apr 7, 2025
## [2.3.5](v2.3.4...v2.3.5) (2025-04-07)

### Bug Fixes

* unhandled exceptions causing crash loops ([#893](#893)) ([f85ba34](f85ba34))
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.

2 participants
0