From a2d50af1bdfbc23af332134b4c13b8356312a8cf Mon Sep 17 00:00:00 2001 From: "Chris S. Kim" Date: Mon, 29 Jan 2024 12:44:13 -0500 Subject: [PATCH] Fix panic on error (#20377) --- internal/controller/cache/index/convenience.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/controller/cache/index/convenience.go b/internal/controller/cache/index/convenience.go index b3c9dbf86b..5c742dd239 100644 --- a/internal/controller/cache/index/convenience.go +++ b/internal/controller/cache/index/convenience.go @@ -132,7 +132,7 @@ func SingleValueFromOneOrTwoArgs[T1 any, T2 any](indexer func(value T1, optional case 1: val, ok := args[0].(T1) if !ok { - return nil, fmt.Errorf("expected first argument type of %T, got: %T", value, args[1]) + return nil, fmt.Errorf("expected first argument type of %T, got: %T", value, args[0]) } value = val default: