@@ -75,9 +75,9 @@ export class FirestoreSaltStore implements ISaltStore {
7575 try {
7676 // Simple operation to test connectivity - just get the collection reference
7777 await this . firestore . collection ( this . collectionName ) . limit ( 1 ) . get ( ) ;
78- } catch ( error ) {
78+ } catch ( err ) {
7979 // Log warning but don't throw - allow graceful degradation
80- logger . warn ( { event : 'FirestoreSaltStoreHealthCheckFailed' , error } ) ;
80+ logger . warn ( { event : 'FirestoreSaltStoreHealthCheckFailed' , err } ) ;
8181 }
8282 }
8383
@@ -280,17 +280,17 @@ export class FirestoreSaltStore implements ISaltStore {
280280 batchSize
281281 } ) ;
282282 }
283- } catch ( error ) {
283+ } catch ( err ) {
284284 logger . error ( {
285285 event : 'FirestoreSaltStoreCleanupFailed' ,
286- error ,
286+ err ,
287287 deletedCount : totalDeleted ,
288288 totalToBeDeleted,
289289 durationMs : Date . now ( ) - startTime ,
290290 cutoffDate : cutoffDate . toISOString ( ) ,
291291 batchSize
292292 } ) ;
293- throw error ;
293+ throw err ;
294294 }
295295
296296 logger . info ( {
@@ -327,21 +327,21 @@ export class FirestoreSaltStore implements ISaltStore {
327327 try {
328328 // Use existing set method which handles atomic creation
329329 return await this . set ( key , newSalt ) ;
330- } catch ( error ) {
330+ } catch ( err ) {
331331 // Handle race condition: another process created the document between our read and create
332332 // We could do this with a transaction, but it adds unnecessary performance overhead
333- if ( error instanceof SaltAlreadyExistsError ) {
333+ if ( err instanceof SaltAlreadyExistsError ) {
334334 // Another process created it, read and return the existing document
335335 const freshSalt = await this . get ( key ) ;
336336 if ( ! freshSalt ) {
337337 throw new Error ( `Document should exist but was not found after race condition for key: ${ key } ` ) ;
338338 }
339339 return freshSalt ;
340340 }
341-
341+
342342 // Re-throw other errors
343- logger . error ( { event : 'FirestoreSaltStoreGetOrCreateFailed' , error } ) ;
344- throw error ;
343+ logger . error ( { event : 'FirestoreSaltStoreGetOrCreateFailed' , err } ) ;
344+ throw err ;
345345 }
346346 }
347347}
0 commit comments