Skip to content

Commit

Permalink
Improve ready API error message
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaavi committed Apr 23, 2024
1 parent b15a4aa commit e35d320
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/endpoints_debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}
Expand Down

0 comments on commit e35d320

Please sign in to comment.