mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
add 403 to expected response codes
This commit is contained in:
parent
5eb5b6fa5e
commit
ea1ae64283
@ -6,7 +6,7 @@ var skins = require("./skins");
|
||||
require("./object-patch");
|
||||
|
||||
var session_url = "https://sessionserver.mojang.com/session/minecraft/profile/";
|
||||
var textures_url = "http://textures.minecraft.net/texture/";
|
||||
var textures_url = "https://textures.minecraft.net/texture/";
|
||||
|
||||
var exp = {};
|
||||
|
||||
@ -28,7 +28,7 @@ exp.get_from_options = function(rid, url, options, callback) {
|
||||
// log url + code + description
|
||||
var code = response && response.statusCode;
|
||||
|
||||
var logfunc = code && code < 405 ? logging.debug : logging.warn;
|
||||
var logfunc = code && (code < 400 || code === 404) ? logging.debug : logging.warn;
|
||||
logfunc(rid, url, code || error && error.code, http_code[code]);
|
||||
|
||||
// not necessarily used
|
||||
@ -49,6 +49,7 @@ exp.get_from_options = function(rid, url, options, callback) {
|
||||
// can be cached as null
|
||||
body = null;
|
||||
break;
|
||||
case 403: // Blocked by CloudFront :(
|
||||
case 429: // this shouldn't usually happen, but occasionally does
|
||||
case 500:
|
||||
case 502: // CloudFront can't reach mojang origin
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user