From: Scott Worley Date: Thu, 28 Dec 2023 23:13:11 +0000 (-0800) Subject: FakeFetcher: Show bad URLs in error messages X-Git-Url: http://git.scottworley.com/paperdoorknob/commitdiff_plain/ae7b6283ed5ead577d1a8f263d37d01717e2bb33?ds=sidebyside FakeFetcher: Show bad URLs in error messages --- diff --git a/fetch.py b/fetch.py index 1d20701..b99938c 100644 --- a/fetch.py +++ b/fetch.py @@ -89,7 +89,7 @@ class FakeFetcher(Fetcher): def fetch(self, url: str) -> bytes: self._fetch_count += 1 if url not in self._resources: - raise requests.HTTPError("URL not found") + raise requests.HTTPError("URL not found", url) return self._resources[url] def request_count(self) -> int: