mirror of
https://github.com/safing/portbase
synced 2025-04-07 11:09:08 +00:00
Improve ready API error message
This commit is contained in:
parent
b15a4aac46
commit
e35d320498
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue