Exception: Posthaste::ContentBlockedError

Inherits:
UnprocessableError show all
Defined in:
lib/posthaste/errors.rb

Overview

The pre-send lint refused the CONTENT.

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

#checkObject

Which check refused it, e.g. dangerous_link or empty_body.



157
158
159
160
# File 'lib/posthaste/errors.rb', line 157

def check
  value = error_field(:check)
  value.is_a?(String) ? value : nil
end

#findingsObject

The whole lint report, warnings included, so one fix pass can address everything rather than playing whack-a-mole one refusal at a time.



164
165
166
167
# File 'lib/posthaste/errors.rb', line 164

def findings
  value = error_field(:findings)
  value.is_a?(Array) ? value : []
end