Skip to content

Add message to expected append-error for web to collect messages#597

Merged
incorbador merged 1 commit intodevelopfrom
add-expected-error-message
Mar 12, 2026
Merged

Add message to expected append-error for web to collect messages#597
incorbador merged 1 commit intodevelopfrom
add-expected-error-message

Conversation

@kopy
Copy link
Copy Markdown
Contributor

@kopy kopy commented Mar 12, 2026

Summary

Expected append errors (append-error events) were missing the messageCode entirely — 12,252 events had NULL messages. This aligns the web SDK with corbado-ios and corbado-android, which always include situation + error details for both expected and unexpected errors.

Cross-SDK comparison (before/after)

Expected error (append-error) Unexpected error (append-error-unexpected)
iOS (CorbadoClient.swift) "situation: {rawValue} {message}" "situation: {rawValue} {message}"
Android (CorbadoClient.kt) "situation: {ordinal} message: {msg} cause: {cause}" "situation: {ordinal} message: {msg} cause: {cause}"
Web (before) NULL — no message passed "situation: {code} type: {type} message: {msg} runtime: {ms}"
Web (after) "situation: {code} type: {type} message: {msg} runtime: {ms}" "situation: {code} type: {type} message: {msg} runtime: {ms}" (unchanged)

Changes

  • AppendProcessProvider.tsx: Extract messageCode before the expected/unexpected branch in both handleErrorSoft and handleErrorHard, pass it to recordEventAppendError(messageCode).
  • ConnectService.ts: Change recordEventAppendError() signature to accept messageCode?: string and forward it to #recordEvent.

…odes. Update ConnectService to accept message codes in recordEventAppendError method.
@kopy
Copy link
Copy Markdown
Contributor Author

kopy commented Mar 12, 2026

Before: No message

image

After: With message

image

@kopy kopy changed the title Add Exception to Expected Errors Add message to expected ppend-error Mar 12, 2026
@kopy kopy changed the title Add message to expected ppend-error Add message to expected append-error Mar 12, 2026
@kopy kopy changed the title Add message to expected append-error Add message to expected append-error for web to collect messages Mar 12, 2026
@kopy kopy requested a review from incorbador March 12, 2026 17:03
@kopy
Copy link
Copy Markdown
Contributor Author

kopy commented Mar 12, 2026

connectprocessevent table - append-error records from tracking DB (last 1h):

Before patch:

Timestamp Process ID Project Event Type Has Message Message
16:55:37.203 3277197734372418502 20 append-error NO NULL
16:55:39.999 3277197734372418502 20 append-error NO NULL
16:55:47.046 3277197734372418502 20 append-error NO NULL
16:58:09.118 3277197734372418502 20 append-error NO NULL

After patch:

Timestamp Process ID Project Event Type Has Message Message
16:58:12.976 3277197734372418502 20 append-error YES situation: 8 type: 2 message: The operation is not allowed at this time because the page does not have focus. runtime: 5
16:58:32.951 3277197734372418502 20 append-error YES situation: 8 type: 2 message: The operation either timed out or was not allowed. See: https://www.w3.org/TR/webauthn-2/#sctn-privacy-considerations-client. runtime: 1294

@incorbador incorbador merged commit e97dc74 into develop Mar 12, 2026
5 checks passed
@incorbador incorbador deleted the add-expected-error-message branch March 12, 2026 18: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