pixl-server-storage 3.0.22 → 3.0.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.
- package/engines/S3.js +21 -5
- package/package.json +1 -1
package/engines/S3.js
CHANGED
|
@@ -275,7 +275,7 @@ module.exports = Class.create({
|
|
|
275
275
|
if (done) return; else done = true;
|
|
276
276
|
|
|
277
277
|
if (err) {
|
|
278
|
-
if (err.code == 'NoSuchKey') {
|
|
278
|
+
if ((err.code == 'NoSuchKey') || (err.code == 'NotFound')) {
|
|
279
279
|
// key not found, special case, don't log an error
|
|
280
280
|
// always include "Not found" in error message
|
|
281
281
|
err = new Error("Failed to fetch key: " + key + ": Not found");
|
|
@@ -346,9 +346,17 @@ module.exports = Class.create({
|
|
|
346
346
|
if (done) return; else done = true;
|
|
347
347
|
|
|
348
348
|
if (err) {
|
|
349
|
-
if ((err.code
|
|
350
|
-
|
|
349
|
+
if ((err.code == 'NoSuchKey') || (err.code == 'NotFound')) {
|
|
350
|
+
// key not found, special case, don't log an error
|
|
351
|
+
// always include "Not found" in error message
|
|
352
|
+
err = new Error("Failed to fetch key: " + key + ": Not found");
|
|
353
|
+
err.code = "NoSuchKey";
|
|
354
|
+
}
|
|
355
|
+
else {
|
|
356
|
+
// some other error
|
|
357
|
+
self.logError('s3', "Failed to fetch key: " + key + ": " + (err.message || err), err);
|
|
351
358
|
}
|
|
359
|
+
|
|
352
360
|
download.destroy();
|
|
353
361
|
callback( err, null );
|
|
354
362
|
return;
|
|
@@ -397,9 +405,17 @@ module.exports = Class.create({
|
|
|
397
405
|
if (done) return; else done = true;
|
|
398
406
|
|
|
399
407
|
if (err) {
|
|
400
|
-
if ((err.code
|
|
401
|
-
|
|
408
|
+
if ((err.code == 'NoSuchKey') || (err.code == 'NotFound')) {
|
|
409
|
+
// key not found, special case, don't log an error
|
|
410
|
+
// always include "Not found" in error message
|
|
411
|
+
err = new Error("Failed to fetch key: " + key + ": Not found");
|
|
412
|
+
err.code = "NoSuchKey";
|
|
402
413
|
}
|
|
414
|
+
else {
|
|
415
|
+
// some other error
|
|
416
|
+
self.logError('s3', "Failed to fetch key: " + key + ": " + (err.message || err), err);
|
|
417
|
+
}
|
|
418
|
+
|
|
403
419
|
download.destroy();
|
|
404
420
|
callback( err, null );
|
|
405
421
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pixl-server-storage",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.23",
|
|
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",
|