Fix calling statusCode of undefined on request.