Handle a bad batch
This commit is contained in:
parent
e9dfd40ecb
commit
91269d5100
1 changed files with 5 additions and 1 deletions
|
@ -39,7 +39,11 @@ class BatchCache:
|
|||
except FileNotFoundError:
|
||||
logger.exception(f"Missing batch file: {path}")
|
||||
continue
|
||||
batch = HashedBatch.parse_raw(data)
|
||||
try:
|
||||
batch = HashedBatch.parse_raw(data)
|
||||
except ValidationError:
|
||||
logger.exception(f"Unable to parse batch, skipping: '{data}'")
|
||||
continue
|
||||
batches[url] = batch
|
||||
return batches
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue