-
Notifications
You must be signed in to change notification settings - Fork 182
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
An answer can be undeleted while the question it belongs to is still deleted #7489
Comments
This is something that's happened a few times previously (the error is recognizable and consistent). Our current scanning process requires that if an answer is reported to SD, then the question also needs to be available via the SE API. In other words, to report a deleted answer, the question needs to also be undeleted. I'm unsure if it's worthwhile to rework things in order to remove that requirement. I haven't looked for what all the existing dependencies are, but removing the need for the question would, potentially, limit future detections. On the other hand, it would be reasonable for SD to recognize that the question being currently deleted is likely the problem and for SD to suggest that the person reporting the answer should check to verify that the question is also undeleted. SD doesn't have a way to know that's the actual issue, because the SE API doesn't provide data about deleted posts, not even an explicit indicator that the post is deleted. The typical indication from the SE API that a post is deleted is merely that no data is returned when requesting data for the post, so we would generally be making a guess (but a good guess) that the issue was that the question was deleted while the answer was undeleted. Side note: it is, in fact, possible to determine that the post is deleted, rather than non-existent, based on there being available flagging options for the post in order to raise an "in need of moderator intervention" flag, but to be able to get the flagging options requires an |
This is a completely reasonable requirement. Even if it is possible to remove this requirement for this specific edge case, I don't think it is worth the development time to do so. The main purpose of this bug report is to improve the error message that gets displayed in such cases, with the hope of cluing the reporting moderator in to the actual problem.
Only if you have already seen and investigated it before. Otherwise, it's completely opaque and non-recognizable. If you report a post that's been deleted, as I did here, you get back the error message:
That's the same error that I would expect to get when I report an answer associated with a deleted question. Instead, I get:
and when running
It is not clear to me why the former can produce an easily-understood error message, while the latter produces an exceptional condition. This exceptional condition should not occur; it should be caught and displayed to the user as an error message. In other words, it is fine that the operation fails, but the operation should fail gracefully. Although it might be both possible and desirable, it is not necessary to guess whether the root cause of the problem is the answer undeleted from a deleted question. It is sufficient to report that Smokey couldn't find data for the specified post using the SE API. |
What problem has occurred? What issues has it caused?
Transcript here. At the very least, it should be more obvious what's going wrong. Probably add a
try
/except
and an error message for this corner case, even though it's arguably esoteric.What would you like to happen/not happen?
Smokey should be prepared for the parent link from the API to be missing, or whatever exactly it is that is failing here.
Analyzing the behavior probably requires mod privileges in practice, or at the very least helpful coordination with a mod who is prepared to recreate the conditions to repro.
The text was updated successfully, but these errors were encountered: