Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Web Install] Error types #898

Open
amandabaker opened this issue Oct 22, 2024 · 0 comments
Open

[Web Install] Error types #898

amandabaker opened this issue Oct 22, 2024 · 0 comments
Assignees
Labels
Web Install API Declarative install for web apps from a web app.

Comments

@amandabaker
Copy link
Member

We once had had a detailed list of error types which was later pruned down to a single AbortError to represent all failure types whether they were related to the user aborting an action or not. Although this may be beneficial for privacy, it poses usability issues as the developer can't tell the difference between bad inputs, user action/cancellation, and misc other technical mishaps. Instead, here is a proposed list of minimal errors that balance usability and privacy:

DOMExceptions:

  • InvalidStateError:
    • When used outside of the main frame
  • NotAllowedError:
    • When used without user activation
    • Invalid inputs (e.g. install url isn't a valid url)
  • AbortError
    • User aborts installation when prompted
    • Browser aborts installation due to privacy settings

Custom rejection messages:

  • ManifestIdMismatch: when the provided id param doesn't match the app's id
  • NoIdInManifest: For same-origin only. When the app's manifest does not declare a valid id
@amandabaker amandabaker added the Web Install API Declarative install for web apps from a web app. label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Web Install API Declarative install for web apps from a web app.
Projects
None yet
Development

No branches or pull requests

2 participants