From 4d360e6b53311f8030abbb68beddbbe82923a4b2 Mon Sep 17 00:00:00 2001 From: Shawn Grigson Date: Tue, 12 Sep 2023 02:43:02 -0500 Subject: [PATCH] block more errors for 401 --- src/fediblockhole/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fediblockhole/__init__.py b/src/fediblockhole/__init__.py index c9a7531..d78e7c2 100755 --- a/src/fediblockhole/__init__.py +++ b/src/fediblockhole/__init__.py @@ -485,7 +485,8 @@ def fetch_instance_follows(token: str, host: str, domain: str, scheme: str='http if response.status_code == 403: log.error(f"Cannot fetch follow information for {domain} from {host}: {response.content}") - raise ValueError(f"Something went wrong: {response.status_code}: {response.content}") + if response.status_code != 401: + raise ValueError(f"Something went wrong: {response.status_code}: {response.content}") # Get the total returned follows = int(response.json()[0]['total'])