From e82f5ccf02ff76756dbd063d54173a375e1edd88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Mon, 21 Oct 2019 20:25:56 +0200 Subject: [PATCH] ve.init.mw.MobileArticleTarget: Remove error handling hacks for MobileFrontend As of commit c65ed0e7a8ac5f32a3a6e4cb2760dae03e4fca22 in MobileFrontend, it uses errorformat=html queries (the same as we do), so we no longer need to massage the responses to make it happy. The same commit also turned parseSaveError() into a no-op, so we can remove that as well. Change-Id: I4f0109ce120ebf94e5709d47d775a8178ce216fa --- .../targets/ve.init.mw.MobileArticleTarget.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/modules/ve-mw/init/targets/ve.init.mw.MobileArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.MobileArticleTarget.js index 4de855bba0..3003889ad3 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.MobileArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.MobileArticleTarget.js @@ -75,15 +75,6 @@ ve.init.mw.MobileArticleTarget.static.trackingName = 'mobile'; // FIXME Some of these users will be on tablets, check for this ve.init.mw.MobileArticleTarget.static.platformType = 'phone'; -/* Static Methods */ - -// FIXME This method is overridden in the MobileFrontend extension, -// figure out a way to make it public there so that we can use it here -/** - * @method - */ -ve.init.mw.MobileArticleTarget.static.parseSaveError = null; - /* Methods */ /** @@ -454,12 +445,7 @@ ve.init.mw.MobileArticleTarget.prototype.saveFail = function ( doc, saveData, wa // parent method ve.init.mw.MobileArticleTarget.super.prototype.saveFail.apply( this, arguments ); - // Massage errorformat=html responses to look more like errorformat=bc expected by MF - if ( data.errors ) { - data.error = data.errors[ 0 ]; - } - - this.overlay.onSaveFailure( this.constructor.static.parseSaveError( data, status ) ); + this.overlay.onSaveFailure( data ); }; /**