Stringify error message in ping endpoint
This commit is contained in:
parent
95f6487912
commit
25cca87959
1 changed files with 5 additions and 1 deletions
|
@ -262,9 +262,13 @@ func (prov *ProvisioningAPI) Ping(w http.ResponseWriter, r *http.Request) {
|
||||||
"is_login_in_progress": user.Conn.IsLoginInProgress(),
|
"is_login_in_progress": user.Conn.IsLoginInProgress(),
|
||||||
}
|
}
|
||||||
err := user.Conn.AdminTest()
|
err := user.Conn.AdminTest()
|
||||||
|
var errStr string
|
||||||
|
if err != nil {
|
||||||
|
errStr = err.Error()
|
||||||
|
}
|
||||||
wa["ping"] = map[string]interface{}{
|
wa["ping"] = map[string]interface{}{
|
||||||
"ok": err == nil,
|
"ok": err == nil,
|
||||||
"err": err,
|
"err": errStr,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
resp := map[string]interface{}{
|
resp := map[string]interface{}{
|
||||||
|
|
Loading…
Reference in a new issue