HomePhabricator
Diffusion Comm 89ddf782aaf4

[keyserver][web][native] Handle link creation / update errors

Tags
None
Referenced Files
F634432: in-use.png
Jul 28 2023, 8:20 AM
File Not Attached
F634433: invalid.png
Jul 28 2023, 8:20 AM
File Not Attached
Subscribers
None

Description

[keyserver][web][native] Handle link creation / update errors

Summary:
In this diff we're handling two errors:

  1. When invalid characters were used in the link

invalid.png (1×1 px, 106 KB)

  1. When an already used link was used

in-use.png (992×1 px, 104 KB)

Copies are based on https://www.figma.com/file/a1nkbWgbgjRlrOY9LVurTz/Comm-%2F-Desktop-app?node-id=11341%3A284796&mode=dev, but with some changes:

  1. Replaced the first chars to the lowercase so that they are consistent e.g. with our login form.
  2. Removed a set of invalid chars from invalid_characters error message because it is impossible to present a complete set of invalid chars (we only support [a-zA-Z0-9]).

https://linear.app/comm/issue/ENG-3916/better-error-handling

Test Plan:
Check if a proper error message is displayed on both web and native when a user tries to:

  1. create a link with ? as a secret
  2. create a link with the same secret as some other link
  3. update a link to have the same secret as some other link

Reviewers: kamil, inka, ashoat

Reviewed By: kamil

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D8494

Details

Provenance
tomekAuthored on Jul 13 2023, 5:56 AM
Reviewer
kamil
Differential Revision
D8494: [keyserver][web][native] Handle link creation / update errors
Parents
rCOMM5aa5f1b2767c: [web][keyserver] `codeVersion` -> 15
Branches
Unknown
Tags
Unknown