@@ -224,11 +224,11 @@ func (uc *unstructuredClient) List(ctx context.Context, obj ObjectList, opts ...
224
224
225
225
func (uc * unstructuredClient ) GetSubResource (ctx context.Context , obj , subResourceObj Object , subResource string , opts ... SubResourceGetOption ) error {
226
226
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 )
228
228
}
229
229
230
230
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 )
232
232
}
233
233
234
234
if subResourceObj .GetName () == "" {
@@ -255,11 +255,11 @@ func (uc *unstructuredClient) GetSubResource(ctx context.Context, obj, subResour
255
255
256
256
func (uc * unstructuredClient ) CreateSubResource (ctx context.Context , obj , subResourceObj Object , subResource string , opts ... SubResourceCreateOption ) error {
257
257
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 )
259
259
}
260
260
261
261
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 )
263
263
}
264
264
265
265
if subResourceObj .GetName () == "" {
0 commit comments