prefix errors with requested uuid

This commit is contained in:
jomo 2015-01-02 05:35:45 +01:00
parent 9d6f602206
commit 64948368c5
3 changed files with 6 additions and 6 deletions

View File

@ -40,7 +40,7 @@ router.get("/:uuid.:ext?", function(req, res) {
helpers.get_avatar(uuid, helm, size, function(err, status, image, hash) { helpers.get_avatar(uuid, helm, size, function(err, status, image, hash) {
logging.log(uuid + " - " + human_status[status]); logging.log(uuid + " - " + human_status[status]);
if (err) { if (err) {
logging.error(err); logging.error(uuid + " " + err);
} }
etag = hash && hash.substr(0, 32) || "none"; etag = hash && hash.substr(0, 32) || "none";
var matches = req.get("If-None-Match") == '"' + etag + '"'; var matches = req.get("If-None-Match") == '"' + etag + '"';
@ -60,7 +60,7 @@ router.get("/:uuid.:ext?", function(req, res) {
} }
}); });
} catch(e) { } catch(e) {
logging.error("Error!"); logging.error(uuid + " error:");
logging.error(e); logging.error(e);
handle_default(500, status); handle_default(500, status);
} }

View File

@ -51,7 +51,7 @@ router.get("/:type/:uuid.:ext?", function(req, res) {
helpers.get_render(uuid, scale, helm, body, function(err, status, hash, image) { helpers.get_render(uuid, scale, helm, body, function(err, status, hash, image) {
logging.log(uuid + " - " + human_status[status]); logging.log(uuid + " - " + human_status[status]);
if (err) { if (err) {
logging.error(err); logging.error(uuid + " " + err);
} }
etag = hash && hash.substr(0, 32) || "none"; etag = hash && hash.substr(0, 32) || "none";
var matches = req.get("If-None-Match") == '"' + etag + '"'; var matches = req.get("If-None-Match") == '"' + etag + '"';
@ -72,7 +72,7 @@ router.get("/:type/:uuid.:ext?", function(req, res) {
} }
}); });
} catch(e) { } catch(e) {
logging.error("Error!"); logging.error(uuid + " error:");
logging.error(e); logging.error(e);
handle_default(500, status); handle_default(500, status);
} }

View File

@ -25,7 +25,7 @@ router.get("/:uuid.:ext?", function(req, res) {
helpers.get_skin(uuid, function(err, hash, image) { helpers.get_skin(uuid, function(err, hash, image) {
logging.log(uuid); logging.log(uuid);
if (err) { if (err) {
logging.error(err); logging.error(uuid + " " + err);
} }
etag = hash && hash.substr(0, 32) || "none"; etag = hash && hash.substr(0, 32) || "none";
var matches = req.get("If-None-Match") == '"' + etag + '"'; var matches = req.get("If-None-Match") == '"' + etag + '"';
@ -45,7 +45,7 @@ router.get("/:uuid.:ext?", function(req, res) {
} }
}); });
} catch(e) { } catch(e) {
logging.error("Error!"); logging.error(uuid + " error:");
logging.error(e); logging.error(e);
handle_default(500); handle_default(500);
} }