From e35d3204987e0031ceb54b56c2b1cb7d30b36e9c Mon Sep 17 00:00:00 2001
From: Daniel <dhaavi@users.noreply.github.com>
Date: Tue, 23 Apr 2024 10:49:16 +0200
Subject: [PATCH] Improve ready API error message

---
 api/endpoints_debug.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/api/endpoints_debug.go b/api/endpoints_debug.go
index 2157b70..9491104 100644
--- a/api/endpoints_debug.go
+++ b/api/endpoints_debug.go
@@ -132,7 +132,7 @@ You can easily view this data in your browser with this command (with Go install
 func ping(ar *Request) (msg string, err error) {
 	// TODO: Remove upgrade to "ready" when all UI components have transitioned.
 	if modules.IsStarting() || modules.IsShuttingDown() {
-		return "", ErrorWithStatus(errors.New("portmaster is not ready"), http.StatusTooEarly)
+		return "", ErrorWithStatus(errors.New("portmaster is not ready, reload (F5) to try again"), http.StatusTooEarly)
 	}
 
 	return "Pong.", nil
@@ -141,7 +141,7 @@ func ping(ar *Request) (msg string, err error) {
 // ready checks if Portmaster has completed starting.
 func ready(ar *Request) (msg string, err error) {
 	if modules.IsStarting() || modules.IsShuttingDown() {
-		return "", ErrorWithStatus(errors.New("portmaster is not ready"), http.StatusTooEarly)
+		return "", ErrorWithStatus(errors.New("portmaster is not ready, reload (F5) to try again"), http.StatusTooEarly)
 	}
 	return "Portmaster is ready.", nil
 }