Skip to content

Commit 4a28e84

Browse files
authored
fix error type in ReadNode when file was not found (#1294)
The method ReadNode in the ocis storage didn't return the error type NotFound when a file was not found. Signed-off-by: David Christofas <[email protected]>
1 parent d1b540e commit 4a28e84

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Bugfix: Fix error type in read node when file was not found
2+
3+
The method ReadNode in the ocis storage didn't return the error type NotFound when a file was not found.
4+
5+
https://github.com/cs3org/reva/pull/1294
6+

pkg/storage/fs/ocis/node.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func ReadNode(ctx context.Context, lu *Lookup, id string) (n *Node, err error) {
183183
} else {
184184
log.Error().Err(err).Interface("node", n).Str("root.ID", root.ID).Msg("ReadNode()")
185185
if isNotFound(err) {
186-
return
186+
return nil, errtypes.NotFound(err.Error())
187187
}
188188
return
189189
}

0 commit comments

Comments
 (0)