Last modified: 2011-08-26 16:27:03 UTC
When doing multiple automatic edits I occasionally get unknown error 231 in between the database lock errors.
This is caused by the following sequence of events: * Article::doEdit() fails, and returns a Status object with failure info * EditPage::internalAttemptSave() checks for $status->isOK(), and returns AS_END if $status signifies an error. The Status object is discarded * API doesn't handle AS_END, falls through to returning an unknown error. There's a comment here about needing to propagate the Status object I guess the best way to fix this would be to refactor internalAttemptSave() to return a Status object instead of one of 30+ error codes.
(In reply to comment #1) > I guess the best way to fix this would be to refactor internalAttemptSave() to > return a Status object instead of one of 30+ error codes. > Please! For back-compat, you can set the error code in $status->value on failure.
(In reply to comment #2) > (In reply to comment #1) > > I guess the best way to fix this would be to refactor internalAttemptSave() to > > return a Status object instead of one of 30+ error codes. > > > > Please! For back-compat, you can set the error code in $status->value on > failure. Thanks for that tip. I took it a little bit further and just made all flow decisions based on $status->value, because EditPage is such a mess. Fixed in r95562.