Bug 313735

Summary: Digital Credentials: user cancel should reject with NotAllowedError, not AbortError
Product: WebKit Reporter: Marcos Caceres <marcosc>
Component: WebCore Misc.Assignee: Marcos Caceres <marcosc>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 268516    

Marcos Caceres
Reported 2026-04-30 05:56:58 PDT
When the user cancels the credential chooser (i.e., the platform returns an empty response), CredentialRequestCoordinator::handleDigitalCredentialsPickerResult() (line ~204) rejects with AbortError: return dismissPickerAndSettle(Exception { ExceptionCode::AbortError, "User aborted the operation."_s }); Per the spec's "initiate the credential request" algorithm (step 3c at https://w3c-fedid.github.io/digital-credentials/#initiate-the-credential-request): "If the user cancels the operation or no credential was selected: Let error be a newly created "NotAllowedError" DOMException." The error should be NotAllowedError, not AbortError. AbortError is reserved for AbortSignal-driven cancellation. Fix: Change ExceptionCode::AbortError to ExceptionCode::NotAllowedError at the empty-response check in handleDigitalCredentialsPickerResult (or its renamed equivalent after bug naming alignment).
Attachments
Marcos Caceres
Comment 1 2026-05-03 23:32:23 PDT
Marcos Caceres
Comment 2 2026-05-03 23:33:08 PDT
EWS
Comment 3 2026-06-26 07:53:41 PDT
Committed 315895@main (7fafcac70285): <https://commits.webkit.org/315895@main> Reviewed commits have been landed. Closing PR #64151 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.