@@ -494,7 +494,7 @@ async function handleRequest(req, res) {
494494 }
495495 const repairs = await findExactDuplicateRepairs ( cachedData . items , scopeId ) ;
496496 const report = computeHygieneReport ( cachedData , scopeId , { exactDuplicateRepairs : repairs } ) ;
497- await recordPrivacyMetric ( HOME , "doctor_open" , activeAdapter . id , { inventoryCount : cachedData . items . length } ) ;
497+ await recordPrivacyMetric ( HOME , "doctor_open" , activeAdapter . id , { inventoryCount : cachedData . items . length } ) . catch ( ( ) => { } ) ;
498498 return json ( res , { ok : true , harness : cachedData . harness , ...report } ) ;
499499 }
500500
@@ -513,7 +513,7 @@ async function handleRequest(req, res) {
513513 filePath => isPathAllowed ( filePath , harnessId , cachedData , { knownOnly : true } ) ,
514514 ) ;
515515 await freshScan ( ) ;
516- await recordPrivacyMetric ( HOME , "repair_apply" , activeAdapter . id , { inventoryCount : cachedData . items . length } ) ;
516+ await recordPrivacyMetric ( HOME , "repair_apply" , activeAdapter . id , { inventoryCount : cachedData . items . length } ) . catch ( ( ) => { } ) ;
517517 return json ( res , result ) ;
518518 } catch ( error ) {
519519 return json ( res , { ok : false , error : error . message } , requestErrorStatus ( error , 400 ) ) ;
@@ -542,7 +542,7 @@ async function handleRequest(req, res) {
542542 targetRootDir : targetPaths . rootDir ,
543543 targetScope,
544544 } ) ;
545- await recordPrivacyMetric ( HOME , "migration_preview" , activeAdapter . id , { inventoryCount : cachedData . items . length } ) ;
545+ await recordPrivacyMetric ( HOME , "migration_preview" , activeAdapter . id , { inventoryCount : cachedData . items . length } ) . catch ( ( ) => { } ) ;
546546 return json ( res , {
547547 ok : true ,
548548 sourceHarness : cachedData . harness ,
@@ -588,7 +588,7 @@ async function handleRequest(req, res) {
588588 validateTarget : async filePath => isPathWithin ( filePath , targetRoot ) ,
589589 } ) ;
590590 if ( result . migrated ) await refreshScanCache ( targetHarnessId ) ;
591- await recordPrivacyMetric ( HOME , "migration_apply" , activeAdapter . id , { inventoryCount : cachedData . items . length } ) ;
591+ await recordPrivacyMetric ( HOME , "migration_apply" , activeAdapter . id , { inventoryCount : cachedData . items . length } ) . catch ( ( ) => { } ) ;
592592 return json ( res , result ) ;
593593 } catch ( error ) {
594594 return json ( res , { ok : false , error : error . message } , requestErrorStatus ( error , 400 ) ) ;
@@ -602,7 +602,7 @@ async function handleRequest(req, res) {
602602 const result = await undoControlPlaneTransaction ( transactionId , CONTROL_DIR , isKnownControlPlanePath ) ;
603603 invalidateCachedData ( harnessId ) ;
604604 for ( const summary of await listAdapters ( ) ) invalidateCachedData ( summary . id ) ;
605- await recordPrivacyMetric ( HOME , kind === "migration" ? "migration_undo" : "repair_undo" , activeAdapter . id ) ;
605+ await recordPrivacyMetric ( HOME , kind === "migration" ? "migration_undo" : "repair_undo" , activeAdapter . id ) . catch ( ( ) => { } ) ;
606606 return json ( res , result ) ;
607607 } catch ( error ) {
608608 return json ( res , { ok : false , error : error . message } , requestErrorStatus ( error , 400 ) ) ;
0 commit comments