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

exceptions are not raised for 5XX errors from SendGrid #118

Open
hrtshu opened this issue Sep 27, 2024 · 0 comments · May be fixed by #119
Open

exceptions are not raised for 5XX errors from SendGrid #118

hrtshu opened this issue Sep 27, 2024 · 0 comments · May be fixed by #119

Comments

@hrtshu
Copy link

hrtshu commented Sep 27, 2024

exceptions are not raised for 5XX errors from SendGrid even with raise_delivery_errors option

if result.status_code && result.status_code.start_with?('4')
full_message = "Sendgrid delivery failed with #{result.status_code}: #{result.body}"
settings[:raise_delivery_errors] ? raise(SendgridDeliveryError, full_message) : warn(full_message)
end

Why only for 4XX erros?

If exceptions are not raised for 5XX errors, it behaves as if it has succeeded.
So we can't notice SendGrid incidents like this even if they occur.

And ActionJob retry or AWS SQS retry or something won't be triggered.

Here's the simple solution: #119

@hrtshu hrtshu linked a pull request Sep 27, 2024 that will close this issue
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 a pull request may close this issue.

1 participant