diff --git a/rspec-tools/rspec_tools/checklinks.py b/rspec-tools/rspec_tools/checklinks.py index 24278911557..bdd33e618c0 100644 --- a/rspec-tools/rspec_tools/checklinks.py +++ b/rspec-tools/rspec_tools/checklinks.py @@ -83,9 +83,10 @@ def live_url(url: str, timeout=5): 'Accept-Language': 'en-US,en;q=0.9', 'Connection': 'keep-alive'}) session = requests.Session() - code = session.send(req.prepare(), timeout=timeout).status_code + response = session.send(req.prepare(), timeout=timeout) + code = response.status_code if (code / 100 >= 4): - print(f"ERROR: {code} Nothing there") + print(f"ERROR: {code} Nothing there ({response.headers})") return False else: return True