{"record":{"id":"05098dcc610e07f7","repo":"languagetool-org/languagetool","slug":"no-content-found-at-url","errorCode":null,"errorMessage":"No content found at '\" + url + \"'","messagePattern":"No content found at '\" \\+ url \\+ \"'","errorType":"exception","errorClass":"PageNotFoundException","httpStatus":null,"severity":"error","filePath":"languagetool-wikipedia/src/main/java/org/languagetool/dev/wikipedia/WikipediaQuickCheck.java","lineNumber":139,"sourceCode":"\n  public MarkupAwareWikipediaResult checkPage(URL url) throws IOException, PageNotFoundException {\n    return checkPage(url, null);\n  }\n\n  /**\n   * @since 2.6\n   */\n  public MarkupAwareWikipediaResult checkPage(URL url, ErrorMarker errorMarker) throws IOException, PageNotFoundException {\n    validateWikipediaUrl(url);\n    String xml = getMediaWikiContent(url);\n    if (xml.length() > maxSizeBytes) {\n      throw new RuntimeException(\"Sorry, the content at \" + url + \" is too big - this process has been limited to \" + maxSizeBytes +\n              \" bytes, but the content is \" + xml.length() + \" bytes\");\n    }\n    MediaWikiContent wikiContent = getRevisionContent(xml);\n    String content = wikiContent.getContent();\n    if (content.trim().isEmpty()) {\n      throw new PageNotFoundException(\"No content found at '\" + url + \"'\");\n    }\n    if (content.toLowerCase().contains(\"#redirect\")) {\n      throw new PageNotFoundException(\"No content but redirect found at '\" + url + \"'\");\n    }\n    return checkWikipediaMarkup(url, wikiContent, getLanguage(url), errorMarker);\n  }\n\n  MarkupAwareWikipediaResult checkWikipediaMarkup(URL url, MediaWikiContent wikiContent, Language language, ErrorMarker errorMarker) throws IOException {\n    SwebleWikipediaTextFilter filter = new SwebleWikipediaTextFilter();\n    PlainTextMapping mapping = filter.filter(wikiContent.getContent());\n    MultiThreadedJLanguageTool lt = getLanguageTool(language);\n    List<AppliedRuleMatch> appliedMatches = new ArrayList<>();\n    List<RuleMatch> matches;\n    try {\n      matches = lt.check(mapping.getPlainText());\n    } finally {\n      lt.shutdown();\n    }","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/languagetool-org/languagetool/blob/2e990059ce67d5e2a0f7f7ca5d31160c6709df4b/languagetool-wikipedia/src/main/java/org/languagetool/dev/wikipedia/WikipediaQuickCheck.java#L121-L157","documentation":"Content guard in WikipediaQuickCheck.checkPage: the MediaWiki API response contains no page content for the URL (page missing or empty), so there is nothing to grammar-check; reported via PageNotFoundException semantics.","triggerScenarios":"Thrown at languagetool-wikipedia/src/main/java/org/languagetool/dev/wikipedia/WikipediaQuickCheck.java:139 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the Wikipedia URL points to an existing article","Handle redirects by following the redirect target","Treat as a non-existent page in callers instead of a hard failure"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2e990059ce67d5e2a0f7f7ca5d31160c6709df4b","analyzedAt":"2026-09-06T09:20:17.015Z","contentChangedAt":"2026-09-06T09:20:17.015Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}