RESOLVED FIXED311722
Digital Credentials: fix DOMException mapping for platform-cancelled and unknown errors in WKDigitalCredentialsPicker
https://bugs.webkit.org/show_bug.cgi?id=311722
Summary Digital Credentials: fix DOMException mapping for platform-cancelled and unkn...
Marcos Caceres
Reported 2026-04-08 03:25:18 PDT
In WKDigitalCredentialsPicker.mm handleNSError: method, two error mappings need to be updated to align with the Digital Credentials spec: 1. WKIdentityDocumentPresentmentErrorCancelled currently maps to AbortError. Since platform-level cancellation is distinct from user-initiated abort (via AbortSignal) and user-initiated cancel (via the chooser UI), it should fall through to OperationError instead. The spec reserves AbortError for the two user/caller-driven cases only. 2. The default/unknown case currently maps to UnknownError. Per the WebIDL spec, UnknownError is defined as "the operation failed for an unknown transient reason (e.g. out of memory)" -- that does not fit a platform error with an unrecognised code. OperationError ("the operation failed for an operation-specific reason") is the correct modern catch-all. Changes needed in handleNSError:: - Remove the WKIdentityDocumentPresentmentErrorCancelled case (let it fall through to default) - Change default case from ExceptionCode::UnknownError to ExceptionCode::OperationError
Attachments
Radar WebKit Bug Importer
Comment 1 2026-04-08 03:25:24 PDT
Marcos Caceres
Comment 2 2026-04-08 04:00:32 PDT
Marcos Caceres
Comment 3 2026-05-03 23:34:25 PDT
EWS
Comment 4 2026-06-27 14:38:16 PDT
Committed 315973@main (8085276859d0): <https://commits.webkit.org/315973@main> Reviewed commits have been landed. Closing PR #64152 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.