pixl-server-storage 3.0.16 → 3.0.17
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.
- package/engines/S3.js +12 -2
- package/package.json +1 -1
package/engines/S3.js
CHANGED
|
@@ -193,7 +193,14 @@ module.exports = Class.create({
|
|
|
193
193
|
if (done) return; else done = true;
|
|
194
194
|
|
|
195
195
|
if (err) {
|
|
196
|
-
if ((err.code
|
|
196
|
+
if ((err.code == 'NoSuchKey') || (err.code == 'NotFound')) {
|
|
197
|
+
// key not found, special case, don't log an error
|
|
198
|
+
// always include "Not found" in error message
|
|
199
|
+
err = new Error("Failed to head key: " + key + ": Not found");
|
|
200
|
+
err.code = "NoSuchKey";
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
// some other error
|
|
197
204
|
self.logError('s3', "Failed to head key: " + key + ": " + (err.message || err), err);
|
|
198
205
|
}
|
|
199
206
|
callback( err, null );
|
|
@@ -277,7 +284,10 @@ module.exports = Class.create({
|
|
|
277
284
|
self.logDebug(9, "JSON fetch complete: " + key, self.debugLevel(10) ? body : null);
|
|
278
285
|
}
|
|
279
286
|
|
|
280
|
-
callback( null, body
|
|
287
|
+
callback( null, body, {
|
|
288
|
+
mod: Math.floor((new Date(data.LastModified)).getTime() / 1000),
|
|
289
|
+
len: data.ContentLength
|
|
290
|
+
} );
|
|
281
291
|
} );
|
|
282
292
|
},
|
|
283
293
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pixl-server-storage",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.17",
|
|
4
4
|
"description": "A key/value/list storage component for the pixl-server framework.",
|
|
5
5
|
"author": "Joseph Huckaby <jhuckaby@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/jhuckaby/pixl-server-storage",
|