Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add raise_for_status_async decorator + follow_redirect #155

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

adnejacobsen
Copy link
Contributor

@adnejacobsen adnejacobsen commented Oct 5, 2023

Added an async version of raise_for_status to the async functions.

When attempting to download a blob with SumoClient.get_async("/objects('{object_ud}')/blob"), response.raise_for_status raises an exception for the 302 Found status code caused by the redirect. Adding follow_redirects=True to the Httpx.AsyncClient solved this.

@adnejacobsen adnejacobsen requested a review from a team October 5, 2023 08:44
Copy link
Contributor

@rwiker rwiker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@adnejacobsen adnejacobsen merged commit 3d7a07b into main Oct 5, 2023
@adnejacobsen adnejacobsen deleted the async-fixes branch October 5, 2023 09:49
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.

2 participants