Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:k8sgpt serve panic- runtime error-invalid memory address or nil pointer dereference #1185

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix:config nil point
  • Loading branch information
jiajia committed Jul 11, 2024
commit 8ee83525238874aebe981d25ebca25be05d3ef67
6 changes: 5 additions & 1 deletion pkg/server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 2,7 @@ package server

import (
"context"
`log`

schemav1 "buf.build/gen/go/k8sgpt-ai/k8sgpt/protocolbuffers/go/schema/v1"
"github.com/k8sgpt-ai/k8sgpt/pkg/cache"
Expand All @@ -21,7 22,10 @@ const (

func (h *handler) AddConfig(ctx context.Context, i *schemav1.AddConfigRequest) (*schemav1.AddConfigResponse, error,
) {

if i == nil {
log.Println("Error: AddConfigRequest is nil")
return nil, status.Error(codes.InvalidArgument, "AddConfigRequest is nil")
}
resp, err := h.syncIntegration(ctx, i)
if err != nil {
return resp, err
Expand Down
Loading