Exception: ActiveSanction::FetchError

Inherits:
SourceError
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/active_sanction/error.rb

Overview

The bytes could not be obtained: a timeout, a refused connection, a redirect chain that does not terminate, a status the caller declared fatal.

Carries #status where a server produced one, and answers #retryable? from it. This is the error a host application backs off on, and the reason the predicate exists: 503 and 429 are the publisher having a bad afternoon, 403 and 404 are a request that will be just as wrong in ten minutes.

Direct Known Subclasses

HttpClient::Error, Sources::MissingPayload

Instance Attribute Summary

Attributes included from Error

#source_id, #status

Instance Method Summary collapse

Methods included from Error

#in_source, #initialize, #to_h

Instance Method Details

#retryable? ⇒ Boolean

Returns:

  • (Boolean)


185
# File 'lib/active_sanction/error.rb', line 185

def retryable? = retryable_or(RETRYABLE_STATUSES.include?(status))