Skip to content

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

Open
@hrtshu

Description

@hrtshu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions