-
Notifications
You must be signed in to change notification settings - Fork 130
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
Enable SDK to reattach large files to messages on retry #487
Enable SDK to reattach large files to messages on retry #487
Conversation
if the file path is present and the file is closed, we can make a copy of the payload and try to re-open the file.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #487 +/- ##
==========================================
- Coverage 99.85% 99.14% -0.72%
==========================================
Files 24 24
Lines 681 700 +19
==========================================
+ Hits 680 694 +14
- Misses 1 6 +5 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
…-send-does-not-include-attachments
Description
This PR enables the SDK to re-attach large files when trying to retry the same request body. If a
file_path
is provided with the attachment request and the file stream is closed, the SDK will attempt to reopen it. The helper functionattach_file_request_builder
will now set thefile_path
in the object, so if you're currently using that helper function, the attachment will be ready for reattachment.License
I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.