zio-entity
zio-entity copied to clipboard
Ignored decoding errors
When data is decoded from database and decoding fails, error is ignored (.toOption
).
https://github.com/thehonesttech/zio-entity/blob/d1aea32e37bf6613d40b0cadc7e0cf6386628c67/postgres/src/main/scala/zio/entity/postgres/snapshot/PostgresqlKeyValueStore.scala#L39
None is returned: https://github.com/thehonesttech/zio-entity/blob/ba79935546da741dacded8c487ad8b289da5d7d5/core/src/main/scala/zio/entity/core/KeyedAlgebraCombinators.scala#L51-L56
and when state is recovered from snapshot than initial state is being used while in fact error should be raised.