Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
David Christofas committed Nov 3, 2020
1 parent 32a59a5 commit 5733e16
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
@@ -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
}

0 comments on commit 5733e16

Please sign in to comment.