mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
log error if http code not available
This commit is contained in:
parent
d49f7279b3
commit
cc2840ae4b
@ -75,8 +75,7 @@ exp.get_from_options = function(rid, url, options, callback) {
|
|||||||
var code = response && response.statusCode;
|
var code = response && response.statusCode;
|
||||||
|
|
||||||
var logfunc = code && code < 405 ? logging.debug : logging.warn;
|
var logfunc = code && code < 405 ? logging.debug : logging.warn;
|
||||||
logfunc(rid, url, code, http_code[code]);
|
logfunc(rid, url, code || error && error.code, http_code[code]);
|
||||||
|
|
||||||
|
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 200:
|
case 200:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user