jenkins-bot has submitted this change and it was merged.

Change subject: Better error mesage when content is not available
......................................................................


Better error mesage when content is not available

Change-Id: Iff962155788b4ce3fb795406a44c801cb1af6324
---
M includes/Import/LiquidThreadsApi/Objects.php
1 file changed, 6 insertions(+), 1 deletion(-)

Approvals:
  Matthias Mullie: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Import/LiquidThreadsApi/Objects.php 
b/includes/Import/LiquidThreadsApi/Objects.php
index b198e2e..69eda56 100644
--- a/includes/Import/LiquidThreadsApi/Objects.php
+++ b/includes/Import/LiquidThreadsApi/Objects.php
@@ -248,7 +248,12 @@
                        $contentKey = '*';
                }
 
-               return $this->apiResponse[$contentKey];
+               if ( isset( $this->apiResponse[$contentKey] ) ) {
+                       return $this->apiResponse[$contentKey];
+               } else {
+                       $encoded = json_encode( $this->apiResponse );
+                       throw new ImportException( "Specified content key 
($contentKey) not available: $encoded" );
+               }
        }
 
        public function getTimestamp() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iff962155788b4ce3fb795406a44c801cb1af6324
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: Matthias Mullie <[email protected]>
Gerrit-Reviewer: SG <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to