mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-04 06:33:11 +00:00
Return err from modify fn
This commit is contained in:
parent
d4736cabf2
commit
f8bc104ecb
@ -54,7 +54,7 @@ method modifyGet*(self: SQLiteDatastore, key: Key, fn: ModifyGet): Future[?!seq[
|
||||
try:
|
||||
(maybeNewData, aux) = await fn(maybeCurrentData)
|
||||
except CatchableError as err:
|
||||
return failure("Error running modify function: " & err.msg)
|
||||
return failure(err)
|
||||
|
||||
if maybeCurrentData == maybeNewData:
|
||||
# no need to change currently stored value
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user