Return err from modify fn

This commit is contained in:
Tomasz Bekas 2023-12-11 12:29:38 +01:00
parent f41bd9528e
commit a62c91bb6b
1 changed files with 1 additions and 1 deletions

View File

@ -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