Skip to content

Commit

Permalink
fix error type in ReadNode when file was not found
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 <dchristofas@owncloud.com>
  • Loading branch information
David Christofas committed Nov 3, 2020
1 parent 32a59a5 commit fcfae52
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/323

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 fcfae52

Please sign in to comment.