fix: perform auth server metadata discovery fallbacks on any 4xx (#1193)
Some checks failed
Main branch checks / checks (push) Has been cancelled

This commit is contained in:
Luca Chang 2025-07-24 03:32:35 -07:00 • committed by GitHub
commit 35777b9811
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -526,8 +526,8 @@ class OAuthClientProvider(httpx.Auth):
break
except ValidationError:
continue
elif oauth_metadata_response.status_code != 404:
break # Non-404 error, stop trying
elif oauth_metadata_response.status_code < 400 or oauth_metadata_response.status_code >= 500:
break # Non-4XX error, stop trying
# Step 3: Register client if needed
registration_request = await self._register_client()