Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
Signed-off-by: Bailin He <[email protected]>
  • Loading branch information
bailinhe committed Sep 30, 2024
1 parent 5ac3d11 commit 23713ac
Show file tree
Hide file tree
Showing 5 changed files with 522 additions and 54 deletions.
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,18 @@ audit.log
identity-api
!chart/identity-api

# vscode stuff
.vscode/*
.vscode/settings.json
!.vscode/tasks.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

# binary files
tmp
9 changes: 9 additions & 0 deletions internal/api/httpsrv/handler_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,15 @@ func (h *apiHandler) DeleteGroup(ctx context.Context, req DeleteGroupRequestObje

group, err := h.engine.GetGroupByID(ctx, gid)
if err != nil {
if errors.Is(err, types.ErrNotFound) {
err = echo.NewHTTPError(
http.StatusNotFound,
fmt.Sprintf("group %s not found", gid),
)

return nil, err
}

return nil, err
}

Expand Down
Loading

0 comments on commit 23713ac

Please sign in to comment.