Skip to content

Commit 4d945af

Browse files
committed
Add log line to aid debugging
1 parent 646ad95 commit 4d945af

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/k8s/client.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"encoding/json"
66
"fmt"
7+
"log/slog"
78
"path"
89

910
"k8s.io/client-go/kubernetes"
@@ -42,6 +43,7 @@ func NewClient(configPath string) (*Client, error) {
4243
func (c *Client) GetRawResource(ctx context.Context, relativePath string) (map[string]any, error) {
4344
body, err := c.client.RESTClient().Get().AbsPath(path.Join("apis", relativePath)).DoRaw(ctx)
4445
if err != nil {
46+
slog.Warn("failed to fetch resource", slog.Any("error", err))
4547
return nil, err
4648
}
4749

0 commit comments

Comments
 (0)