Fix error handling in GetUsers

A missing return statement caused GetUsers to return misleading results
when the identity backend returned an error.
This commit is contained in:
Ralf Haferkamp
2022-03-22 09:23:21 +01:00
parent 1265fd6bc2
commit 3c16713869
2 changed files with 7 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
Bugfix: Fix error handling in GraphAPI GetUsers call
A missing return statement caused GetUsers to return misleading results when
the identity backend returned an error.
https://github.com/owncloud/ocis/pull/3357

View File

@@ -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})