Exception: Parse::Embeddings::InvalidImageURL

Inherits:
Error
  • Object
show all
Defined in:
lib/parse/embeddings.rb

Overview

Raised when validate_image_url! rejects an input URL. Carries a :reason String so retry / logging code can branch on the specific failure mode (:scheme, :port, :userinfo, :host_blocked, :host_not_allowlisted, :dns_rebound, :parse).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reason, message) ⇒ InvalidImageURL

Returns a new instance of InvalidImageURL.



107
108
109
110
# File 'lib/parse/embeddings.rb', line 107

def initialize(reason, message)
  @reason = reason
  super(message)
end

Instance Attribute Details

#reasonSymbol (readonly)

Returns failure-mode tag.

Returns:

  • (Symbol)

    failure-mode tag.



106
107
108
# File 'lib/parse/embeddings.rb', line 106

def reason
  @reason
end