Skip to content

Fix/handle redirect in api calls#77

Open
robberwick wants to merge 2 commits into
mainfrom
fix/handle-redirect-in-api-calls
Open

Fix/handle redirect in api calls#77
robberwick wants to merge 2 commits into
mainfrom
fix/handle-redirect-in-api-calls

Conversation

@robberwick

Copy link
Copy Markdown
Owner

The LLU API can return redirection responses to non-login requests, so the _call_api method should handle these in the same way that the login request does, by raising a RedirectError that the calling code can deal with.

The better longer term solution is probably to provide the ability for any such requests to be retried with the region specified in the api response, but that can come later and is tracked in #76

Extend the existing validate_api_response model validator to catch
redirect responses (e.g. {'redirect': True, 'region': 'us'}) and raise
RedirectError, preventing a ValidationError on missing fields.
@robberwick robberwick force-pushed the fix/handle-redirect-in-api-calls branch from a2378bd to a281fe6 Compare April 19, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant