Exception: Posthaste::SuppressedError
- Inherits:
-
UnprocessableError
- Object
- StandardError
- Error
- APIStatusError
- UnprocessableError
- Posthaste::SuppressedError
- Defined in:
- lib/posthaste/errors.rb
Overview
The recipient is on the suppression list. Read #suppression.
Never work around this. Sending to a suppressed address is how a sending IP gets blocklisted, and the block lands on every other customer sharing it — which is why the API refuses rather than warns.
Instance Attribute Summary
Attributes inherited from Error
#body, #request_id, #retry_after_seconds, #status, #type
Instance Method Summary collapse
Methods inherited from Error
#error_field, #initialize, #inspect, #quota_exhausted?, #rate_limited?, #transient?
Constructor Details
This class inherits a constructor from Posthaste::Error
Instance Method Details
#suppression ⇒ Object
141 142 143 144 145 146 147 |
# File 'lib/posthaste/errors.rb', line 141 def suppression address = error_field(:address) reason = error_field(:reason) return nil unless address.is_a?(String) SuppressionInfo.new(address: address, reason: reason.is_a?(String) ? reason : nil) end |