diff --git a/internal/delivery/http/user.go b/internal/delivery/http/user.go index 8443cec0..53797942 100644 --- a/internal/delivery/http/user.go +++ b/internal/delivery/http/user.go @@ -182,11 +182,6 @@ func (u UserHandler) List(w http.ResponseWriter, r *http.Request) { } users, err := u.usecase.ListWithPagination(r.Context(), organizationId, pg) if err != nil { - if _, status := httpErrors.ErrorResponse(err); status == http.StatusNotFound { - ResponseJSON(w, r, http.StatusNoContent, domain.ListUserResponse{}) - return - } - log.ErrorfWithContext(r.Context(), "error is :%s(%T)", err.Error(), err) ErrorJSON(w, r, err) return diff --git a/internal/repository/user.go b/internal/repository/user.go index 5403d81f..2571b1f6 100644 --- a/internal/repository/user.go +++ b/internal/repository/user.go @@ -195,9 +195,6 @@ func (r *UserRepository) ListWithPagination(pg *pagination.Pagination, organizat log.Errorf("error is :%s(%T)", res.Error.Error(), res.Error) return nil, res.Error } - if res.RowsAffected == 0 { - return nil, httpErrors.NewNotFoundError(httpErrors.NotFound, "", "") - } var out []domain.User for _, user := range users {