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

Validate attachment response and throw error #396

Merged
merged 7 commits into from
Dec 16, 2024

Conversation

kraju3
Copy link
Contributor

@kraju3 kraju3 commented Dec 9, 2024

Description

At the moment we are not returning a NylasAPIError exception if we are unable to download the attachment. Which results in customers writing the content to a file. This PR adds a validation for the download request and return an exception if the status code is >=400.

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.

@kraju3
Copy link
Contributor Author

kraju3 commented Dec 16, 2024

@AaronDDM Is it good to merge this PR?

@kraju3 kraju3 force-pushed the fix-attachment-download branch from 28d16cf to 0941036 Compare December 16, 2024 15:22
@AaronDDM AaronDDM merged commit 5922f8c into nylas:main Dec 16, 2024
4 of 5 checks passed
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