Exception: ActiveSanction::Storage::CorruptSnapshot
- Inherits:
-
ActiveSanction::StorageError
- Object
- StandardError
- ActiveSanction::StorageError
- ActiveSanction::Storage::CorruptSnapshot
- 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.