mobiletto 1.1.22 → 1.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/util/redis.js +11 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobiletto",
3
- "version": "1.1.22",
3
+ "version": "1.1.23",
4
4
  "description": "A storage layer that presents a uniform interface to Amazon S3, Backblaze B2, and local storage",
5
5
  "main": "index.js",
6
6
  "keywords": [
package/util/redis.js CHANGED
@@ -134,16 +134,24 @@ class MobilettoCache {
134
134
  asyncFunc(key).then(
135
135
  (val) => {
136
136
  if (typeof val !== 'undefined') {
137
+ logger.debug(`applyToMatchingKeys: found key ${key} = ${val}`)
137
138
  results.push(val)
139
+ } else {
140
+ logger.debug(`applyToMatchingKeys: found key with undefined value: ${key}`)
138
141
  }
139
142
  },
140
143
  (e) => {
141
- logger.error(`applyToMatchingKeys: error with key ${key}: ${e}`)
142
- reject(e)
144
+ const message = `applyToMatchingKeys: error with key ${key}: ${e}`;
145
+ logger.error(message)
146
+ reject(message)
143
147
  })
144
148
  }
145
149
  }, (err, matchCount) => {
146
- if (err) reject(err)
150
+ if (err) {
151
+ logger.error(`applyToMatchingKeys: error in final callback: ${err}`)
152
+ reject(err)
153
+ }
154
+ logger.error(`applyToMatchingKeys: resolving and returning ${results.length} results`)
147
155
  resolve(results)
148
156
  })
149
157
  })