Exception: Parse::Embeddings::ImageFetch::InvalidImageType
- Defined in:
- lib/parse/embeddings/image_fetch.rb
Overview
Raised when downloaded bytes fail content verification — unknown
magic bytes, sniffed type outside the allowlist, or an
extension / magic-byte disagreement. Carries a :reason tag
(:unknown_magic, :type_not_allowed, :extension_mismatch,
:empty) so callers can branch on the failure mode.
Instance Attribute Summary collapse
-
#reason ⇒ Symbol
readonly
Failure-mode tag.
Instance Method Summary collapse
-
#initialize(reason, message) ⇒ InvalidImageType
constructor
A new instance of InvalidImageType.
Constructor Details
#initialize(reason, message) ⇒ InvalidImageType
Returns a new instance of InvalidImageType.
59 60 61 62 |
# File 'lib/parse/embeddings/image_fetch.rb', line 59 def initialize(reason, ) @reason = reason super() end |
Instance Attribute Details
#reason ⇒ Symbol (readonly)
Returns failure-mode tag.
58 59 60 |
# File 'lib/parse/embeddings/image_fetch.rb', line 58 def reason @reason end |