mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
catch 204 responses from mojang
I have no idea what causes 404 and what causes 204, but then it's mojang 💩
This commit is contained in:
parent
5ccff8474d
commit
ff5e9a601b
@ -58,7 +58,7 @@ exp.get_from_options = function(rid, url, options, callback) {
|
||||
callback(body, response, null);
|
||||
} else if (error) {
|
||||
callback(body || null, response, error);
|
||||
} else if (response.statusCode === 404) {
|
||||
} else if (response.statusCode === 404 || response.statusCode === 204) {
|
||||
// page does not exist
|
||||
logging.log(rid + url + " url does not exist");
|
||||
callback(null, response, null);
|
||||
@ -68,7 +68,7 @@ exp.get_from_options = function(rid, url, options, callback) {
|
||||
callback(body || null, response, error);
|
||||
} else {
|
||||
logging.error(rid + url + " Unknown error:");
|
||||
logging.error(rid + response);
|
||||
logging.error(rid + JSON.stringify(response));
|
||||
callback(body || null, response, error);
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user