mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-22 07:51:17 +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);
|
callback(body, response, null);
|
||||||
} else if (error) {
|
} else if (error) {
|
||||||
callback(body || null, response, error);
|
callback(body || null, response, error);
|
||||||
} else if (response.statusCode === 404) {
|
} else if (response.statusCode === 404 || response.statusCode === 204) {
|
||||||
// page does not exist
|
// page does not exist
|
||||||
logging.log(rid + url + " url does not exist");
|
logging.log(rid + url + " url does not exist");
|
||||||
callback(null, response, null);
|
callback(null, response, null);
|
||||||
@ -68,7 +68,7 @@ exp.get_from_options = function(rid, url, options, callback) {
|
|||||||
callback(body || null, response, error);
|
callback(body || null, response, error);
|
||||||
} else {
|
} else {
|
||||||
logging.error(rid + url + " Unknown error:");
|
logging.error(rid + url + " Unknown error:");
|
||||||
logging.error(rid + response);
|
logging.error(rid + JSON.stringify(response));
|
||||||
callback(body || null, response, error);
|
callback(body || null, response, error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user