From f1fa4aa1e27ba0e5de059f1b3c2088ee24cefbcf Mon Sep 17 00:00:00 2001 From: Michael Manfre Date: Wed, 4 Jan 2023 23:45:29 -0500 Subject: [PATCH] Ignore 406 response for webfinger and nodeinfo (#356) --- users/models/domain.py | 2 +- users/models/identity.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/users/models/domain.py b/users/models/domain.py index b6f152a..5a140ca 100644 --- a/users/models/domain.py +++ b/users/models/domain.py @@ -166,7 +166,7 @@ class Domain(StatorModel): if ( response and response.status_code < 500 - and response.status_code not in [401, 403, 404, 410] + and response.status_code not in [401, 403, 404, 406, 410] ): raise ValueError( f"Client error fetching nodeinfo: domain={self.domain}, code={response.status_code}", diff --git a/users/models/identity.py b/users/models/identity.py index 6fcfd47..afb2498 100644 --- a/users/models/identity.py +++ b/users/models/identity.py @@ -658,7 +658,7 @@ class Identity(StatorModel): if ( response and response.status_code < 500 - and response.status_code not in [401, 403, 404, 410] + and response.status_code not in [401, 403, 404, 406, 410] ): raise ValueError( f"Client error fetching webfinger: {response.status_code}",