Skip to content

Commit

Permalink
Fix error handling in GetUsers
Browse files Browse the repository at this point in the history
A missing return statement caused GetUsers to return missleading results
when the identity backend returned an error.
  • Loading branch information
rhafer committed Mar 22, 2022
1 parent 1265fd6 commit aab2d17
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/graph-getusers-err.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Fix error handling in GraphAPI GetUsers call

A missing return statement caused GetUsers to return missleading results when
the identity backend returned an error.

https://github.com/owncloud/ocis/pull/3357
1 change: 1 addition & 0 deletions graph/pkg/service/v0/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func (g Graph) GetUsers(w http.ResponseWriter, r *http.Request) {
} else {
errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, err.Error())
}
return
}
render.Status(r, http.StatusOK)
render.JSON(w, r, &listResponse{Value: users})
Expand Down

0 comments on commit aab2d17

Please sign in to comment.