Page MenuHomePhabricator

HelpPanel schema: log actual error message in event_data for 'submit-failure' action
Closed, ResolvedPublic

Event Timeline

@MMiller_WMF @nettrom_WMF here are two versions of logging the error message. The first logs the error message:

question_length=4;include_title=true;had_email=false;had_email_confirmed=false;email_form_has_content=false;email_form_changed=false;error=This action has been automatically identified as harmful, and therefore disallowed. If you believe your action was constructive, please inform an administrator of what you were trying to do. A brief description of the abuse rule which your action matched is: spamma

This one logs the error code:


The error message is more informative than the error code since it tells you which rule was violated, but maybe we don't need to know exactly which abuse filter rule was triggered? Please let me know which one you'd prefer.

As far as I'm concerned, we don't need to store the specific rule since I can look that up in the log in the MW database. It's perhaps more important to understand why the post failed (e.g. because the user was blocked, or AbuseFilter triggered), rather than specifically what caused it? So for me, knowing the error message works, but that's largely because I can look the specifics up when needed.

Change 513022 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Log error code with action_data on submit-failure

Change 513022 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Log error code with action_data on submit-failure

Etonkovidova added a subscriber: Etonkovidova.

Checked in betalabs (the Console log):

event.HelpPanel {action: "submit-failure", action_data: "question_length=37;include_title=true;had_email=fa…l_form_changed=false;error=abusefilter-disallowed", user_id: 16883, user_editcount: 0, editor_interface: "wikitext-2017", …}action: "submit-failure"action_data: "question_length=37;include_title=true;had_email=false;had_email_confirmed=false;email_form_has_content=false;email_form_changed=false;error=abusefilter-disallowed"editor_interface: "wikitext-2017"help_panel_session_id: "6807f31e504f29006352"is_mobile: falsepage_id: 194651page_ns: 0page_protection: ""page_title: "Selenium_wikitext_editor_test_0.7168180124348296"session_token: "1397d44c5aa55a768f7b"user_can_edit: trueuser_editcount: 0user_id: 16883__proto__: Object