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

return a better response code when not sending a recovery email #172

Closed
rybit opened this issue May 15, 2018 · 3 comments
Closed

return a better response code when not sending a recovery email #172

rybit opened this issue May 15, 2018 · 3 comments

Comments

@rybit
Copy link
Member

rybit commented May 15, 2018

In this case, we silently fail and don't tell the client that we are not going to send the email. I am thinking a 429 but def not an expert on right code.

gotrue/api/mail.go

Lines 43 to 45 in 6dae5c5

if u.RecoverySentAt != nil && !u.RecoverySentAt.Add(maxFrequency).Before(time.Now()) {
return nil
}

@ryuhhnn
Copy link

ryuhhnn commented Oct 5, 2018

I'm happy to submit a PR for this. Perhaps sending 412 (Precondition Failed) or 501 (Not Implemented) may be a more appropriate error code. 501 seems most appropriate since it would have failed on the server side and lacks the ability to resolve the response completely.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had activity in 1 year. It will be closed in 7 days if no further activity occurs. Thanks!

@github-actions github-actions bot added the stale label Apr 24, 2021
@github-actions
Copy link

github-actions bot commented May 1, 2021

This issue was closed because it had no activity for over 1 year.

@github-actions github-actions bot closed this as completed May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants