plugin XEP-0384: Regenerate key on corrupted data.
This commit is contained in:
parent
45395c729a
commit
d8b083cdb0
1 changed files with 4 additions and 0 deletions
|
|
@ -186,6 +186,10 @@ class StorageImpl(omemo.Storage):
|
|||
return omemo.Just(await self.__storage[key])
|
||||
except KeyError:
|
||||
return omemo.Nothing()
|
||||
except ValueError as e:
|
||||
# Corrupted data in the database, we return empty to trigger key regeneration.
|
||||
log.error(f"Corrupted OMEMO storage data for key {key!r}: {e}")
|
||||
return omemo.Nothing()
|
||||
except Exception as e:
|
||||
raise omemo.StorageException(f"Error while loading key {key}") from e
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue