diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py index 106303bd6..9a5ca6041 100644 --- a/sphinx/builders/linkcheck.py +++ b/sphinx/builders/linkcheck.py @@ -428,6 +428,8 @@ class CheckExternalLinksBuilder(DummyBuilder): self.write_entry('redirected ' + text, docname, filename, lineno, uri + ' to ' + info) self.write_linkstat(linkstat) + else: + raise ValueError("Unknown status %s." % status) def write_entry(self, what: str, docname: str, filename: str, line: int, uri: str) -> None: