if cloud interface reports upstream is off, notify the web client of the same (#22118)

Этот коммит содержится в:
Nathaniel Allred
2023-01-23 08:20:21 -06:00
коммит произвёл GitHub
родитель f76d240495
Коммит 813a7efbcd

Просмотреть файл

@@ -217,7 +217,11 @@ func handleSignupAvailable(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
if err := c.App.Cloud().SelfHostedSignupAvailable(); err != nil {
c.Err = model.NewAppError(where, "api.server.hosted_signup_unavailable.error", nil, "", http.StatusNotImplemented)
if err.Error() == "upstream_off" {
c.Err = model.NewAppError(where, "api.server.hosted_signup_unavailable.error", nil, "", http.StatusServiceUnavailable)
} else {
c.Err = model.NewAppError(where, "api.server.hosted_signup_unavailable.error", nil, "", http.StatusNotImplemented)
}
return
}