-
Notifications
You must be signed in to change notification settings - Fork 228
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
3.16 - Handle different errors from the beacon script #6603
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy will stop sending the deprecated coverage status from June 5th, 2024. Learn more |
Thanks for the PR! |
Thanks for the update. Do you think a closeTimeout would be beneficial too, to avoid a timeout running in the background when it's not needed anymore? |
That's a good idea, I pushed now a code that uses clearTimeout function |
Tests looks OK to me to catch errors. Infinite loop is not prevents if we brutally do while(true) bu that's probably expected as the event loop is not freed? (or something like this). I'd say we should go ahead and merge. |
Description
Fixes #6570
Documentation
User documentation
Now we handle two different scenarios:
Exactly here:
wp-rocket/assets/js/lcp-beacon.js
Line 26 in 5fc1fd4
You can simulate this by putting any strange line exactly inside the try block here:
wp-rocket/assets/js/lcp-beacon.js
Lines 16 to 21 in 5fc1fd4
Technical documentation
Explain how this code works. Diagram & drawings are welcomed.
Type of change
Delete options that are not relevant.
New dependencies
List any new dependencies that are required for this change.
Risks
List possible performance & security issues or risks, and explain how they have been mitigated.
Checklists
Feature validation
Documentation
Code style
Observability
Risks