Skip to content

Commit

Permalink
fix error type in ReadNode when file was not found (#1294)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
C0rby authored Nov 4, 2020
1 parent d1b540e commit 4a28e84
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions changelog/unreleased/readnode-error-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Fix error type in read node when file was not found

The method ReadNode in the ocis storage didn't return the error type NotFound when a file was not found.

https://github.com/cs3org/reva/pull/1294

2 changes: 1 addition & 1 deletion pkg/storage/fs/ocis/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func ReadNode(ctx context.Context, lu *Lookup, id string) (n *Node, err error) {
} else {
log.Error().Err(err).Interface("node", n).Str("root.ID", root.ID).Msg("ReadNode()")
if isNotFound(err) {
return
return nil, errtypes.NotFound(err.Error())
}
return
}
Expand Down

0 comments on commit 4a28e84

Please sign in to comment.