File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -482,11 +482,19 @@ async function sendPing(manual = false) {
482482 } , STATUS_UPDATE_DELAY_MS ) ;
483483
484484 state . meshMapperTimer = setTimeout ( async ( ) => {
485- await postToMeshMapperAPI ( lat , lon ) ;
485+ // Capture accuracy in closure to ensure it's available in nested callback
486+ const capturedAccuracy = accuracy ;
487+
488+ try {
489+ await postToMeshMapperAPI ( lat , lon ) ;
490+ } catch ( error ) {
491+ console . error ( "MeshMapper API post failed:" , error ) ;
492+ // Continue with map refresh and status update even if API fails
493+ }
486494
487495 // Update map after API post to ensure backend updated
488496 setTimeout ( ( ) => {
489- if ( accuracy && accuracy < GPS_ACCURACY_THRESHOLD_M ) {
497+ if ( capturedAccuracy && capturedAccuracy < GPS_ACCURACY_THRESHOLD_M ) {
490498 scheduleCoverageRefresh ( lat , lon ) ;
491499 }
492500
You can’t perform that action at this time.
0 commit comments