From 59a2c55e1484f1266f0b87bfa3d069b184d6204f Mon Sep 17 00:00:00 2001 From: Michael Bolot Date: Wed, 11 Jan 2023 15:43:42 -0600 Subject: [PATCH] Fixes a bug with resource.error watch events Watch events need to have a type defined by k8s.io/apimachinery/pkg/watch to be properly interpreted. Fixes a bug where this was not the case --- pkg/stores/proxy/proxy_store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/stores/proxy/proxy_store.go b/pkg/stores/proxy/proxy_store.go index 1f91c4a..b32dfc6 100644 --- a/pkg/stores/proxy/proxy_store.go +++ b/pkg/stores/proxy/proxy_store.go @@ -257,7 +257,7 @@ func (s *Store) list(apiOp *types.APIRequest, schema *types.APISchema, client dy func returnErr(err error, c chan watch.Event) { c <- watch.Event{ - Type: "resource.error", + Type: watch.Error, Object: &metav1.Status{ Message: err.Error(), },