Commit 2682f810 authored by Mohamed, Fawzi Roberto (fawzi)'s avatar Mohamed, Fawzi Roberto (fawzi)
Browse files

fix entry point error_detail if pod not available

parent 9dc8bd05
......@@ -111,8 +111,16 @@ module.exports = function (app, redirect, config, proxyServer, proxyRouter, k8,
} else if (podInfo.status.phase === 'Pending' || podInfo.status.phase === 'Running') {
let error_detail = ''
let secondsSinceCreation = (Date.now() - Date.parse(podInfo.metadata.creationTimestamp))/ 1000.0
const error = {
error: "not ready",
msg: "pod not yet ready",
status: podInfo.status,
host: podIp,
pod: podInfo,
secondsSinceCreation: secondsSinceCreation
}
if (!secondsSinceCreation || secondsSinceCreation > 15)
error_detail = stringify(err, null, 2)
error_detail = stringify(error, null, 2)
let repl = {
refreshEachS: config.app.pageReloadTime,
error_detail: error_detail
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment