ooom nevermind, understood, the else (which isn't show in this github diff) is accessing res.code without checking res first :S