mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-05 15:13:14 +00:00
missing key should return appropriate error
This commit is contained in:
parent
5e30230a9f
commit
2680789884
@ -133,7 +133,7 @@ method get*(self: FSDatastore, key: Key): Future[?!seq[byte]] {.async.} =
|
||||
return failure "Path is protected!"
|
||||
|
||||
if not fileExists(path):
|
||||
return success(newSeq[byte]())
|
||||
return failure(newException(DatastoreKeyNotFound, "Key doesn't exist"))
|
||||
|
||||
var
|
||||
file: File
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user