code: function onerror(cb) {
    return function (err) {
      if (err) {
        shas = {}
        arguments[0] = err instanceof Error ? err : new Error(err.toString())
      }
      cb.apply(null, arguments)
    }
  }
docs: If an error occurs, we must be prudent and assume data was lost. We clean the shas cache.