Exception: Html2rss::NoFeedItemsExtracted

Inherits:
Error
  • Object
show all
Defined in:
lib/html2rss/error.rb

Overview

Raised when auto fallback exhausts all concrete tiers and extractors find no feed items.

Constant Summary collapse

SURFACE_HINT_CATEGORIES =

Categories that append shared surface guidance to the empty-feed message.

%i[app_shell blocked_surface].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attempts:, surface_category: nil) ⇒ NoFeedItemsExtracted

Returns a new instance of NoFeedItemsExtracted.

Parameters:

  • attempts (Array<Hash{Symbol => Object}>)

    tier attempt diagnostics

  • surface_category (Symbol, nil) (defaults to: nil)

    optional Scraper surface classification



15
16
17
18
19
# File 'lib/html2rss/error.rb', line 15

def initialize(attempts:, surface_category: nil)
  @attempts = attempts
  @surface_category = surface_category
  super(build_message)
end

Instance Attribute Details

#attemptsArray<Hash{Symbol => Object}> (readonly)

Returns tier attempt diagnostics.

Returns:

  • (Array<Hash{Symbol => Object}>)

    tier attempt diagnostics



22
23
24
# File 'lib/html2rss/error.rb', line 22

def attempts
  @attempts
end

#surface_categorySymbol? (readonly)

Returns surface classification when a response body was available.

Returns:

  • (Symbol, nil)

    surface classification when a response body was available



25
26
27
# File 'lib/html2rss/error.rb', line 25

def surface_category
  @surface_category
end