mirror of
https://github.com/bitinflow/localtunnel.git
synced 2026-03-13 13:35:54 +00:00
handle errors from localtunnel server when requesting initial url
This commit is contained in:
@@ -199,6 +199,11 @@ Tunnel.prototype._init = function(cb) {
|
||||
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 host = upstream.hostname;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user