Skip to content

Commit a15d6db

Browse files
authored
Merge pull request #215 from FlowFuse/213-health-check-message
Provide better health check message when waiting for NR to start
2 parents 6ff015e + f631a0b commit a15d6db

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/launcher.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,11 @@ class Launcher {
423423
const res = await got.head(pollUrl, opts)
424424
statusCode = res.statusCode || 500
425425
} catch (error) {
426-
this.logBuffer.add({ level: 'system', msg: `Node-RED health check failed: ${error.toString()} (${pollUrl})` })
426+
if (this.state === States.STARTING) {
427+
this.logBuffer.add({ level: 'system', msg: 'Node-RED health check: waiting for Node-RED to start' })
428+
} else {
429+
this.logBuffer.add({ level: 'system', msg: `Node-RED health check failed: ${error.toString()} (${pollUrl})` })
430+
}
427431
console.log('Failed to poll NR on ', pollUrl, error)
428432
statusCode = error.response?.statusCode || 500
429433
}

0 commit comments

Comments
 (0)