vapor-community / sendgrid-kit

📧 A Swift on Server SDK for the SendGrid API
https://swiftpackageindex.com/vapor-community/sendgrid-kit
MIT License
10 stars 14 forks source link

Fix email send response handling #15

Closed melgu closed 1 year ago

melgu commented 1 year ago

The send(email:) call always throws, even in the success case. This is because the API returns 202 accepted, not 200 ok in the success case.

This is why I've added a check against .accepted. To not break anything else, I've kept the check against .ok, but from my understanding it could be removed.

melgu commented 1 year ago

@Andrewangeta Hi! Can you (or someone else with write access) please have a look at the PR? Thank you 😊

melgu commented 1 year ago

Is this project still maintained?