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

fix: update MaxFrequency error message to reflect number of seconds #1540

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

J0
Copy link
Contributor

@J0 J0 commented Apr 17, 2024

What kind of change does this PR introduce?

Currently we use a constant value on number of seconds left before a developer can send a follow up email confirmation. This can prove confusing if developer has a custom setting for MaxFrequency on Sms or SMTP

Considered pushing the check into validateFrequencyLimit in sendConfirmationMail or similar. Unfortunately, that would obscure the existing error message and return an internalServerError instead which might be harder to interpret for a dev

@coveralls
Copy link

coveralls commented Apr 17, 2024

Pull Request Test Coverage Report for Build 9089975509

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 9 of 25 (36.0%) changed or added relevant lines in 9 files are covered.
  • 475 unchanged lines in 15 files lost coverage.
  • Overall coverage decreased (-0.1%) to 65.463%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/api/identity.go 1 2 50.0%
internal/api/magic_link.go 0 1 0.0%
internal/api/user.go 0 1 0.0%
internal/api/reauthenticate.go 0 2 0.0%
internal/api/signup.go 0 5 0.0%
internal/api/resend.go 0 6 0.0%
Files with Coverage Reduction New Missed Lines %
internal/api/resend.go 1 50.38%
internal/api/logout.go 1 83.78%
internal/mailer/mailer.go 4 72.34%
internal/storage/dial.go 7 68.03%
internal/api/api.go 11 86.52%
internal/api/phone.go 11 81.31%
internal/hooks/auth_hooks.go 15 54.55%
internal/models/errors.go 15 50.0%
internal/api/provider/azure.go 16 69.89%
internal/api/middleware.go 21 84.17%
Totals Coverage Status
Change from base Build 8693432544: -0.1%
Covered Lines: 8372
Relevant Lines: 12789

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants