diff --git a/Logic/Web/Wikipedia.ts b/Logic/Web/Wikipedia.ts index 6be26931ce..5ee6227df3 100644 --- a/Logic/Web/Wikipedia.ts +++ b/Logic/Web/Wikipedia.ts @@ -147,6 +147,9 @@ export default class Wikipedia { }, ] } + if(result["error"]){ + throw "Could not download: "+JSON.stringify(result) + } const el = document.createElement("html") el.innerHTML = result["content"].replace(/href="\//g, 'href="' + this.backend + "/") const searchResults = el.getElementsByClassName("mw-search-results")