diff --git a/CHANGELOG.md b/CHANGELOG.md index c21a1dc..ec63fdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) (as of version 1.2.0). +## Unreleased + +### Changed + +- Scraper fails for all HTTP error codes returned when checking URL at startup (#223) + ## [1.5.3] - 2023-10-02 ### Changed diff --git a/zimit.py b/zimit.py index 0ddbd27..943f7c0 100755 --- a/zimit.py +++ b/zimit.py @@ -451,6 +451,7 @@ def check_url(url, scope=None): resp = requests.head( url.geturl(), stream=True, allow_redirects=True, timeout=(12.2, 27) ) + resp.raise_for_status() except requests.exceptions.RequestException as exc: print(f"failed to connect to {url.geturl()}: {exc}", flush=True) raise SystemExit(1)