block more errors for 401

This commit is contained in:
Shawn Grigson 2023-09-12 02:43:02 -05:00
parent a1f81d197f
commit 4d360e6b53
1 changed files with 2 additions and 1 deletions

View File

@ -485,7 +485,8 @@ def fetch_instance_follows(token: str, host: str, domain: str, scheme: str='http
if response.status_code == 403: if response.status_code == 403:
log.error(f"Cannot fetch follow information for {domain} from {host}: {response.content}") 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 # Get the total returned
follows = int(response.json()[0]['total']) follows = int(response.json()[0]['total'])