diff --git a/spec/index.bs b/spec/index.bs index a94400e7..e27a8014 100644 --- a/spec/index.bs +++ b/spec/index.bs @@ -685,6 +685,38 @@ dictionary DisconnectedAccount { required USVString account_id; }; +## The IdentityCredentialError Interface ## {#browser-api-identity-credential-error-interface} + + +This specification introduces a new type of {{DOMException}}, the {{IdentityCredentialError}}. It +is used when the [=IDP=] cannot create an {{IdentityCredential}} after the user has requested to use +a federated account. + +
+  [Exposed=Window, SecureContext]
+  interface IdentityCredentialError: DOMException {
+    constructor(optional DOMString message = "", IdentityCredentialErrorInit options);
+    readonly attribute DOMString code;
+    readonly attribute DOMString url;
+  };
+
+ +
+The {{IdentityCredentialError/constructor()}}, given a |realm|, a {{DOMString}} |message| and a + {{IdentityCredentialErrorInit}} |options| must run the following steps: + 1. Invoke the {{DOMException}}'s {{DOMException/constructor()}}, passing |realm| and |message|. + 1. Set this.{{IdentityCredentialError/code}} to |options|.{{IdentityCredentialError/code}}. + 1. Set this.{{IdentityCredentialError/url}} to |options.{{IdentityCredentialError/url}}. +
+ +
+ : {{IdentityCredentialError/code}} + :: The {{IdentityCredentialError/code}}'s attribute getter returns the value it is set to. + It represents the type of error which resulted in an {{IdentityCredential}} not being created. + : {{IdentityCredentialError/url}} + :: The {{IdentityCredentialError/url}}'s attribute getter returns the value it is set to. + It represents a URL where the user can learn more information about the error. +
## The IdentityCredentialError Interface ## {#browser-api-identity-credential-error-interface} @@ -1441,6 +1473,13 @@ dictionary IdentityProviderToken { }; + +dictionary IdentityCredentialErrorInit { + DOMString code; + DOMString url; +}; + + ### Request permission to sign-up ### {#request-permission-signup}