B2G/gecko/services/sync/modules/engines.js
/*
   * Decide on (and partially effect) an error-handling strategy.
   *
   * Asks the Service to respond to an HMAC error, which might result in keys
   * being downloaded. That call returns true if an action which might allow a
   * retry to occur.
   *
   * If `mayRetry` is truthy, and the Service suggests a retry,
   * handleHMACMismatch returns kRecoveryStrategy.retry. Otherwise, it returns
   * kRecoveryStrategy.error.
   *
   * Subclasses of SyncEngine can override this method to allow for different
   * behavior -- e.g., to delete and ignore erroneous entries.
   *
   * All return values will be part of the kRecoveryStrategy enumeration.
   */
Decide on (and partially effect) an error-handling strategy.
Asks the Service to respond to an HMAC error, which might result in keys
being downloaded. That call returns true if an action which might allow a
retry to occur.

If `mayRetry` is truthy, and the Service suggests a retry,
handleHMACMismatch returns kRecoveryStrategy.retry.

Subclasses of SyncEngine can override this method to allow for different
behavior -- e.g., to delete and ignore erroneous entries.

All return values will be part of the kRecoveryStrategy enumeration.
Decide on ( and partially effect ) an error - handling strategy . Asks the Service to respond to an HMAC error which might result in keys being downloaded . That call returns true if an action which might allow a retry to occur . If ` mayRetry ` is truthy and the Service suggests a retry handleHMACMismatch returns kRecoveryStrategy . retry . Subclasses of SyncEngine can override this method to allow for different behavior -- e . g . to delete and ignore erroneous entries . All return values will be part of the kRecoveryStrategy enumeration .
function handleHMACMismatch(item, mayRetry) {
    return (Weave.Service.handleHMACEvent() && mayRetry) ?
           SyncEngine.kRecoveryStrategy.retry :
           SyncEngine.kRecoveryStrategy.error;
  }
function handleHMACMismatch ( item , mayRetry ) { return ( Weave . Service . handleHMACEvent ( ) && mayRetry ) ? SyncEngine . kRecoveryStrategy . retry : SyncEngine . kRecoveryStrategy . error ; }
Decide on (and partially effect) an error-handling strategy.
Decide on ( and partially effect ) an error - handling strategy .
// By default we either try again, or bail out noisily.