Skip to content

Re-raise 4xx responses from server when uploading files #284

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

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

aron
Copy link
Contributor

@aron aron commented Jul 5, 2024

Fixes #270

We were falling back to base64 encoding the file data when requests to upload the file failed. However if the client makes an invalid request such as failing to include Authorization headers by forgetting to auth then we should surface these errors.

This commit now re-raises any 4xx errors returned while attempting to upload a file and adds tests to verify the behavior.

Fixes #270

We were falling back to base64 encoding the file data when requests to
upload the file failed. However if the client makes an invalid request
such as failing to include Authorization headers by forgetting to auth
then we should surface these errors.

This commit now re-raises any 4xx errors returned while attempting to
upload a file and adds tests to verify the behavior.
@aron aron requested a review from mattt July 5, 2024 15:41
Copy link
Contributor

@mattt mattt left a comment

Choose a reason for hiding this comment

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

Thanks, @aron!

@mattt mattt merged commit 997da15 into main Jul 5, 2024
19 checks passed
@mattt mattt deleted the raise-http-error branch July 5, 2024 18:13
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.

RangeError: Maximum call stack size exceeded when uploading image (in version 0.30.1)
2 participants