From 813a7efbcd9c04f65e03aa422b7c1f319b3e5aeb Mon Sep 17 00:00:00 2001 From: Nathaniel Allred Date: Mon, 23 Jan 2023 08:20:21 -0600 Subject: [PATCH] if cloud interface reports upstream is off, notify the web client of the same (#22118) --- api4/hosted_customer.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api4/hosted_customer.go b/api4/hosted_customer.go index ae11514ae4..9c76b33efc 100644 --- a/api4/hosted_customer.go +++ b/api4/hosted_customer.go @@ -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 }