Exception: ActiveSanction::Storage::CorruptSnapshot

Inherits:
ActiveSanction::StorageError show all
Defined in:
lib/active_sanction/storage.rb

Overview

A stored snapshot that cannot be trusted to be what it says it is: a truncated file, bytes that no longer hash to the checksum recorded beside them, a sidecar that is not JSON, a list filed under one source that claims to be another.

Raised rather than repaired, and rather than returning whatever could still be read. A store that hands back the 8,000 records it managed to parse out of 19,015 produces a report that looks exactly like a clean one, which is the most expensive thing this library can get wrong. An operator can always delete the list and re-sync; nobody can recover a screening decision made against a list that was quietly half there.

Instance Attribute Summary

Attributes included from Error

#source_id, #status

Method Summary

Methods included from Error

#in_source, #initialize, #retryable?, #to_h