Page MenuHomePhabricator

AbuseFilter should display a more useful message instead of "An unknown error occurred."
Closed, ResolvedPublic

Description

If I try to calculate the result of applying ccnorm to a long string (e.g. 9000 x 'a', or a typical value of the added_lines variable), I get the message "An unknown error occurred." but there is more information in the console:

"mw.Api error: " "http" Object { xhr: Object, textStatus: "error", exception: "Request-URI Too Large" }

My suggestion is to provide a more informative message for the user in this case.


Version: unspecified
Severity: normal

Details

Reference
bz68767

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:29 AM
bzimport set Reference to bz68767.
bzimport added a subscriber: Unknown Object (MLST).

Change 150080 had a related patch set uploaded by Helder.wiki:
Use POST method for action=abusefilterevalexpression API requests

https://gerrit.wikimedia.org/r/150080

Change 150080 merged by jenkins-bot:
Use POST method for action=abusefilterevalexpression API requests

https://gerrit.wikimedia.org/r/150080

Helder: Does your merged patch fix this, or is more work needed?

We need a little more. The previous patch just avoid that specific HTTP error from happening, but there could be others, and it would be useful to expose the exact information to the user if it is available. I'll submit another patch in a few minutes.

Change 150557 had a related patch set uploaded by Helder.wiki:
Improve error handling for HTTP requests

https://gerrit.wikimedia.org/r/150557

Change 150557 merged by jenkins-bot:
Improve error handling for HTTP requests

https://gerrit.wikimedia.org/r/150557