Module: Dragonfly::ErrorClassifier
- Defined in:
- lib/dragonfly/error_classifier.rb
Class Method Summary collapse
-
.fog_sync_clock_nil_date?(error) ⇒ Boolean
Fog can raise this TypeError when sync_clock parses a nil Date header.
Class Method Details
.fog_sync_clock_nil_date?(error) ⇒ Boolean
Fog can raise this TypeError when sync_clock parses a nil Date header.
Treat this as a transient upstream/storage issue so callers can retry.
9 10 11 12 13 14 15 16 17 |
# File 'lib/dragonfly/error_classifier.rb', line 9 def fog_sync_clock_nil_date?(error) return false unless error.is_a?(TypeError) return false unless error..include?('no implicit conversion of nil into String') Array(error.backtrace).any? do |line| line.include?('fog/aws/requests/storage/sync_clock.rb') || line.include?('Fog::AWS::Storage::Real#sync_clock') end end |