jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/372148 )

Change subject: Fix dieWithError or dieError usages in GetEntities
......................................................................


Fix dieWithError or dieError usages in GetEntities

This takes some parts of I0d2a471 out of the patch

Change-Id: I191dfbfd9fcda3939a4b7139581a5c31707db38b
---
M repo/i18n/en.json
M repo/i18n/qqq.json
M repo/includes/Api/GetEntities.php
3 files changed, 5 insertions(+), 3 deletions(-)

Approvals:
  WMDE-leszek: Looks good to me, approved
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve



diff --git a/repo/i18n/en.json b/repo/i18n/en.json
index 9ab1fd6..c4a3f62 100644
--- a/repo/i18n/en.json
+++ b/repo/i18n/en.json
@@ -327,6 +327,7 @@
        "wikibase-api-failed-save": "The save has failed.",
        "wikibase-api-illegal-entity-remove": "Entities can not be deleted by 
providing a top-level <var>remove</var> key.",
        "wikibase-api-illegal-entity-selector": "You need to provide either an 
entity <var>id</var>, or a <var>site</var> and <var>page</var> combination, but 
not both.",
+       "wikibase-api-illegal-entities-selector": "Either provide the item 
\"ids\" or pairs of \"sites\" and \"titles\" for corresponding page",
        "wikibase-api-inconsistent-language": "Inconsistent language detected.",
        "wikibase-api-inconsistent-site": "Inconsistent site detected.",
        "wikibase-api-invalid-guid": "Invalid claim guid.",
diff --git a/repo/i18n/qqq.json b/repo/i18n/qqq.json
index 0b270c2..e7bb2c5 100644
--- a/repo/i18n/qqq.json
+++ b/repo/i18n/qqq.json
@@ -360,6 +360,7 @@
        "wikibase-api-failed-save": "This is an error message for a situation 
where the API tries to save an item (e.g. on Wikidata) but the operation could 
not be completed.",
        "wikibase-api-illegal-entity-remove": "Error message when the user 
misplaced a <var>remove</var> key too high in the JSON structure they 
provided.",
        "wikibase-api-illegal-entity-selector": "Error message when the user 
fails to provide one of the parameter combinations allowed to address 
entities.",
+       "wikibase-api-illegal-entities-selector": "Error message when the user 
fails to provide one of the parameter combinations allowed to address 
entities.",
        "wikibase-api-inconsistent-language": "!!DO NOT TRANSLATE!! 
Inconsistent language detected",
        "wikibase-api-inconsistent-site": "!!DO NOT TRANSLATE!! Inconsistent 
site detected",
        "wikibase-api-invalid-guid": "!!DO NOT TRANSLATE!! Invalid uniquie 
identifying provided for a claim",
diff --git a/repo/includes/Api/GetEntities.php 
b/repo/includes/Api/GetEntities.php
index 15d0308..7f7d410 100644
--- a/repo/includes/Api/GetEntities.php
+++ b/repo/includes/Api/GetEntities.php
@@ -120,8 +120,8 @@
                $params = $this->extractRequestParams();
 
                if ( !isset( $params['ids'] ) && ( empty( $params['sites'] ) || 
empty( $params['titles'] ) ) ) {
-                       $this->errorReporter->dieError(
-                               'Either provide the item "ids" or pairs of 
"sites" and "titles" for corresponding pages',
+                       $this->errorReporter->dieWithError(
+                               'wikibase-api-illegal-entities-selector',
                                'param-missing'
                        );
                }
@@ -172,7 +172,7 @@
                                $ids[] = $this->idParser->parse( $id );
                        } catch ( EntityIdParsingException $e ) {
                                $this->errorReporter->dieWithError(
-                                       [ 'no-such-entity', $id ],
+                                       [ 'wikibase-api-no-such-entity', $id ],
                                        'no-such-entity',
                                        0,
                                        [ 'id' => $id ]

-- 
To view, visit https://gerrit.wikimedia.org/r/372148
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I191dfbfd9fcda3939a4b7139581a5c31707db38b
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: AnotherLadsgroup <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: WMDE-leszek <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to