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

Send error message when rate limit is reached #2527

Merged
merged 2 commits into from Nov 3, 2022
Merged

Conversation

Nutomic
Copy link
Member

@Nutomic Nutomic commented Nov 2, 2022

Sending an empty response is security by obscurity, and very confusing for users. Better to give an actual error message.

LemmyNet/lemmyBB#38 (comment)

// if rate limit was hit, respond with http 400
Ok(ServiceResponse::new(
Ok(ServiceResponse::from_err(
LemmyError::from_message("error_rate_limited"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The i18n string is "rate_limit_error"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

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