Skip to content

DID-9566: [QA-SIGNALS-SDK] Browser monitoring signals and event delivery - #29

Merged
arosasg merged 1 commit into
masterfrom
botinc/run-26851706
Oct 30, 2026
Merged

arosasg merged 1 commit into
masterfrom
botinc/run-26851706

Conversation

@botinc-agent

@botinc-agent botinc-agent Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Problem

submitEvent() crashed with an untyped RangeError: Invalid time value when an integrator passed an invalid occurredAt Date (for example new Date("not a date") from a failed parse). buildEventRequestBody() called toISOString() before the documented input checks, so bad input escaped the SDK's DiditEventError contract and broke the caller's sign-in flow instead of reporting a validation problem.

Solution

  • Validate occurredAt in submitEvent() and refuse an invalid Date with a typed validation error, matching the existing token and category checks.
  • Document the extra validation case in the package README and the occurredAt type comment.
  • Add a regression test that fails before the check and passes after it.

Verification

  • Signals unit tests: 50 passed; full root Jest suite: 189 passed.
  • npm run typecheck, npm run build and npm run test:size pass; the bundle is 5,107 of 5,120 bytes.
  • Browser E2E: 191 passed, 7 credential-dependent skips across Chromium, Firefox and WebKit.
  • Staging E2E: sign-up/login/logout and partial-batch outcomes pass against the staging API; exploratory staging checks covered page, sign-in and custom events, SPA navigation, 25-event batching, network retry, page exit, token refusal and subject binding. Test events and API keys were cleaned up.

@arosasg
arosasg merged commit f47b9b6 into master Oct 30, 2026
5 checks passed
@arosasg
arosasg deleted the botinc/run-26851706 branch October 30, 2026 20:20
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