Use specific error message for unique email constraint violation
Nobody has claimed this yet.
- Dominant language
- Elixir
- Stars
- 296
- Forks
- 86
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 50
Description
Describe the bug
Currently all email conflicts and unique constraint violations generate an email error message:
"This email address already exists."
The message was generalized on workflows API work to report other field errors correctly, but email message needs to be a specific.
Version number
v2.10.9
I have reproduced this locally on main:
- Yes
- No
To Reproduce
- Go to any screen with a field that is not an email and needs to be unique and uses the ChangesetJSON
- Try to duplicate it and it shall show "This email address already exists."
Expected behavior
Use "This email address already exists." for email
Use "This value should be unique." for other fields (fixed on Workflows API)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how ChangesetJSON formats unique-constraint errors, then compare the related Workflows API change in PR #2792. The fix is complete when email uniqueness still uses the email-specific message and other unique fields use the generic uniqueness message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100