Skip to content

change loader error handling - #415

Merged
e271828- merged 1 commit into
masterfrom
fix/error_handling
Aug 1, 2026
Merged

change loader error handling#415
e271828- merged 1 commit into
masterfrom
fix/error_handling

Conversation

@e271828-

@e271828- e271828- commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Normalize SDK script-load failures to script-error.
  • Report script-load-error-other if the initial onError handler throws.
  • Prevent loader rejection values from ever leaking through onError.

Motivation

  • Existing promise chaining routed exceptions thrown by initial error handling back through handleError.
  • hcaptcha-loader has more error states, but the relevant error is that the script couldn't be loaded.

Testing

Used 'manual' Chromium test with unreachable scriptSource to confirm:

  • Normal handler: script-error
  • Throwing handler: script-error, then script-load-error-other
  • Initial request plus two retries failed as expected.

@e271828-
e271828- requested a review from faris-imi August 1, 2026 10:39
@e271828-
e271828- requested a review from a team as a code owner August 1, 2026 10:39
@e271828-
e271828- merged commit 1f4b929 into master Aug 1, 2026
4 checks passed
@e271828-
e271828- deleted the fix/error_handling branch August 1, 2026 12:19
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