@@ -87,12 +87,12 @@ export async function setupNamespacedInformer(
8787 return await kubernetesApiWrappers . retryKubernetesApiRequest ( ( ) =>
8888 listMethod ( ) ,
8989 ) ;
90- } catch ( err ) {
90+ } catch ( error ) {
9191 logger . error (
92- { ...logContext , err } ,
92+ { ...logContext , error } ,
9393 'error while listing workloads in namespace' ,
9494 ) ;
95- throw err ;
95+ throw error ;
9696 }
9797 } ;
9898
@@ -102,9 +102,9 @@ export async function setupNamespacedInformer(
102102 loggedListMethod ,
103103 ) ;
104104
105- informer . on ( ERROR , ( err ) => {
105+ informer . on ( ERROR , ( error ) => {
106106 // Types from client library insists that callback is of type KubernetesObject
107- const code = ( err as any ) . code || '' ;
107+ const code = ( error as any ) . code || '' ;
108108 logContext . code = code ;
109109 if ( RETRYABLE_NETWORK_ERRORS . includes ( code ) ) {
110110 logger . debug ( logContext , 'informer error occurred, restarting informer' ) ;
@@ -115,7 +115,7 @@ export async function setupNamespacedInformer(
115115 } , 1000 ) ;
116116 } else {
117117 logger . error (
118- { ...logContext , err } ,
118+ { ...logContext , error } ,
119119 'unexpected informer error event occurred' ,
120120 ) ;
121121 }
@@ -130,7 +130,7 @@ export async function setupNamespacedInformer(
130130 ( watchedWorkload . metadata && watchedWorkload . metadata . name ) ||
131131 FALSY_WORKLOAD_NAME_MARKER ;
132132 logger . warn (
133- { ...logContext , error, name } ,
133+ { ...logContext , error, workloadName : name } ,
134134 'could not execute the namespaced informer handler for a workload' ,
135135 ) ;
136136 }
@@ -162,12 +162,12 @@ export async function setupClusterInformer(
162162 return await kubernetesApiWrappers . retryKubernetesApiRequest ( ( ) =>
163163 listMethod ( ) ,
164164 ) ;
165- } catch ( err ) {
165+ } catch ( error ) {
166166 logger . error (
167- { ...logContext , err } ,
167+ { ...logContext , error } ,
168168 'error while listing workloads in cluster' ,
169169 ) ;
170- throw err ;
170+ throw error ;
171171 }
172172 } ;
173173
@@ -177,9 +177,9 @@ export async function setupClusterInformer(
177177 loggedListMethod ,
178178 ) ;
179179
180- informer . on ( ERROR , ( err ) => {
180+ informer . on ( ERROR , ( error ) => {
181181 // Types from client library insists that callback is of type KubernetesObject
182- const code = ( err as any ) . code || '' ;
182+ const code = ( error as any ) . code || '' ;
183183 logContext . code = code ;
184184 if ( RETRYABLE_NETWORK_ERRORS . includes ( code ) ) {
185185 logger . debug ( logContext , 'informer error occurred, restarting informer' ) ;
@@ -190,7 +190,7 @@ export async function setupClusterInformer(
190190 } , 1000 ) ;
191191 } else {
192192 logger . error (
193- { ...logContext , err } ,
193+ { ...logContext , error } ,
194194 'unexpected informer error event occurred' ,
195195 ) ;
196196 }
@@ -209,7 +209,7 @@ export async function setupClusterInformer(
209209 ( watchedWorkload . metadata && watchedWorkload . metadata . name ) ||
210210 FALSY_WORKLOAD_NAME_MARKER ;
211211 logger . warn (
212- { ...logContext , error, name } ,
212+ { ...logContext , error, workloadName : name } ,
213213 'could not execute the cluster informer handler for a workload' ,
214214 ) ;
215215 }
0 commit comments