Skip to content

Commit 33c7665

Browse files
committed
Fixup
1 parent f19e5fa commit 33c7665

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

coderd/httpapi/httpapi.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@ import (
1313
"strings"
1414
"time"
1515

16-
"github.com/coder/coder/coderd/database/dbauthz"
17-
"github.com/coder/coder/coderd/rbac"
18-
1916
"github.com/go-playground/validator/v10"
2017
"golang.org/x/xerrors"
2118

19+
"github.com/coder/coder/coderd/database/dbauthz"
20+
"github.com/coder/coder/coderd/rbac"
2221
"github.com/coder/coder/coderd/tracing"
2322
"github.com/coder/coder/codersdk"
2423
)

enterprise/coderd/groups.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ func (api *API) patchGroup(rw http.ResponseWriter, r *http.Request) {
231231
})
232232
return
233233
}
234-
if xerrors.Is(err, sql.ErrNoRows) {
234+
if httpapi.Is404Error(err) {
235235
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
236236
Message: "Failed to add or remove non-existent group member",
237237
Detail: err.Error(),

0 commit comments

Comments
 (0)