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

Prevent failed requests on failed user silence check #215

merged 2 commits into from Dec 18, 2019


Copy link

@thebaer thebaer commented Nov 28, 2019

This avoids requests completely failing when a user suspension check fails, such as when IsUserSuspended() indicates that a "user isn't found".

There's still some work to do. For example, not-found pages (like /siteinfo.json) previously showed:

{"error": "Post not found."}

Before this fix, they'd show a "Server error" page and a 500.

With this fix, they show:

{"error": "Post not found."}<!DOCTYPE HTML>
		<title>Page not found &mdash; WF MySQL Multi?</title>

(and erroneously send two status headers).

@thebaer thebaer added this to the 0.11.2 milestone Nov 28, 2019
@thebaer thebaer marked this pull request as ready for review December 18, 2019 01:57
This also saves a user suspension check when a post isn't found.
Copy link
Member Author

thebaer commented Dec 18, 2019

Actually, previously mentioned issue isn't a regression. We'll need to do some refactoring to fix the issue, but that's out of scope here.

Made one more change that prevents an unnecessary log for the user silence check.

@thebaer thebaer merged commit 8dc1ef0 into hotfix-0.11.2 Dec 18, 2019
@thebaer thebaer deleted the prevent-fail-on-suspend-check branch December 18, 2019 02:13
@thebaer thebaer mentioned this pull request Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant