ngrok does not gets started immediately and gives following error
"a successful ngrok tunnel session has not yet been established"
the module checks for error 500 and 502 but no action is taken for 503
adding below code works
const notReady503 = err.statusCode === 503 && body.details && body.details.err === 'a successful ngrok tunnel session has not yet been established';
function isRetriable (err) {
if (!err.response) return false;
const body = err.response.body;
const notReady500 = err.statusCode === 500 && /panic/.test(body)
const notReady502 = err.statusCode === 502 && body.details && body.details.err === 'tunnel session not ready yet';
const notReady503 = err.statusCode === 503 && body.details && body.details.err === 'a successful ngrok tunnel session has not yet been established';
return notReady500 || notReady502 || notReady503;
}
ngrok does not gets started immediately and gives following error "a successful ngrok tunnel session has not yet been established"
the module checks for error 500 and 502 but no action is taken for 503
adding below code works const notReady503 = err.statusCode === 503 && body.details && body.details.err === 'a successful ngrok tunnel session has not yet been established';
function isRetriable (err) { if (!err.response) return false; const body = err.response.body; const notReady500 = err.statusCode === 500 && /panic/.test(body) const notReady502 = err.statusCode === 502 && body.details && body.details.err === 'tunnel session not ready yet'; const notReady503 = err.statusCode === 503 && body.details && body.details.err === 'a successful ngrok tunnel session has not yet been established'; return notReady500 || notReady502 || notReady503; }