Skip to content

Commit 73949d0

Browse files
authored
Merge pull request #2343 from Poor12/fix-logs
✨Fix logs in unstructured client
2 parents 589f3fa + 29eb0cf commit 73949d0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/client/unstructured_client.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,11 @@ func (uc *unstructuredClient) List(ctx context.Context, obj ObjectList, opts ...
224224

225225
func (uc *unstructuredClient) GetSubResource(ctx context.Context, obj, subResourceObj Object, subResource string, opts ...SubResourceGetOption) error {
226226
if _, ok := obj.(runtime.Unstructured); !ok {
227-
return fmt.Errorf("unstructured client did not understand object: %T", subResource)
227+
return fmt.Errorf("unstructured client did not understand object: %T", obj)
228228
}
229229

230230
if _, ok := subResourceObj.(runtime.Unstructured); !ok {
231-
return fmt.Errorf("unstructured client did not understand object: %T", obj)
231+
return fmt.Errorf("unstructured client did not understand object: %T", subResourceObj)
232232
}
233233

234234
if subResourceObj.GetName() == "" {
@@ -255,11 +255,11 @@ func (uc *unstructuredClient) GetSubResource(ctx context.Context, obj, subResour
255255

256256
func (uc *unstructuredClient) CreateSubResource(ctx context.Context, obj, subResourceObj Object, subResource string, opts ...SubResourceCreateOption) error {
257257
if _, ok := obj.(runtime.Unstructured); !ok {
258-
return fmt.Errorf("unstructured client did not understand object: %T", subResourceObj)
258+
return fmt.Errorf("unstructured client did not understand object: %T", obj)
259259
}
260260

261261
if _, ok := subResourceObj.(runtime.Unstructured); !ok {
262-
return fmt.Errorf("unstructured client did not understand object: %T", obj)
262+
return fmt.Errorf("unstructured client did not understand object: %T", subResourceObj)
263263
}
264264

265265
if subResourceObj.GetName() == "" {

0 commit comments

Comments
 (0)