mirror of
https://github.com/bitinflow/localtunnel.git
synced 2026-10-31 20:59:08 +00:00
handle errors from localtunnel server when requesting initial url
This commit is contained in:
1 parent
92bb807908
commit
3d54de851f
1 file changed
+5
@@ -199,6 +199,11 @@ Tunnel.prototype._init = function(cb) {
|
|||||||
return setTimeout(get_url, 1000);
|
return setTimeout(get_url, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (res.status !== 200) {
|
||||||
|
var err = new Error((body && body.message) || 'localtunnel server returned an error, please try again');
|
||||||
|
return cb(err);
|
||||||
|
}
|
||||||
|
|
||||||
var port = body.port;
|
var port = body.port;
|
||||||
var host = upstream.hostname;
|
var host = upstream.hostname;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user