We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d72f4b2 commit 82b1085Copy full SHA for 82b1085
coderd/users.go
@@ -257,10 +257,8 @@ func (api *API) users(rw http.ResponseWriter, r *http.Request) {
257
userIDs = append(userIDs, user.ID)
258
}
259
organizationIDsByMemberIDsRows, err := api.Database.GetOrganizationIDsByMemberIDs(ctx, userIDs)
260
- if xerrors.Is(err, sql.ErrNoRows) {
261
- err = nil
262
- }
263
- if err != nil {
+ // No rows is fine, you just requested an empty page.
+ if !xerrors.Is(err, sql.ErrNoRows) {
264
httpapi.Write(ctx, rw, http.StatusInternalServerError, codersdk.Response{
265
Message: "Internal error fetching user's organizations.",
266
Detail: err.Error(),
0 commit comments