jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/393519 )
Change subject: Youdao: Fix the error code reading ...................................................................... Youdao: Fix the error code reading First check if response.body.errorCode is present. If not go for response.body. This was reverse in I9738d71971753f4 Change-Id: Id8ff3ff26f92a30c1eb7baa8ea471067f415e223 --- M lib/mt/Youdao.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/mt/Youdao.js b/lib/mt/Youdao.js index 8f16a82..5ec5cc1 100644 --- a/lib/mt/Youdao.js +++ b/lib/mt/Youdao.js @@ -103,7 +103,7 @@ return response.body.translation[ 0 ]; } else { throw new Error( 'Translation with Youdao failed. Error: ' + - this.getErrorName( response.body || response.body.errorCode ) + + this.getErrorName( response.body.errorCode || response.body ) + ` for ${sourceLang} > ${targetLang}` ); } } ); -- To view, visit https://gerrit.wikimedia.org/r/393519 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id8ff3ff26f92a30c1eb7baa8ea471067f415e223 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/cxserver Gerrit-Branch: master Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com> Gerrit-Reviewer: KartikMistry <kartik.mis...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits