ArticleTarget: Remove duplicate error codes when logging

Occasionally we end up logging error codes like
"abusefilter-disallowed,abusefilter-disallowed,abusefilter-warning"
when someone hits a bunch of different filtes.

Change-Id: I967d374d13473ca684412b380d732653a3ceaff3
This commit is contained in:
Bartosz Dziewoński 2023-08-14 19:07:03 +02:00
parent 09f3c43759
commit 46f661ac66

View file

@ -804,9 +804,9 @@ ve.init.mw.ArticleTarget.prototype.saveFail = function ( doc, saveData, wasRetry
var errorCodes;
if ( data.errors ) {
errorCodes = data.errors.map( function ( err ) {
errorCodes = OO.unique( data.errors.map( function ( err ) {
return err.code;
} ).join( ',' );
} ) ).join( ',' );
} else if ( ve.getProp( data, 'visualeditoredit', 'edit', 'captcha' ) ) {
// Eww
errorCodes = 'captcha';