chore: Make better error message if missing license (#7440)

* chore: Make better error message if missing license

* Change word to proxies
This commit is contained in:
Steven Masley
2023-05-05 14:22:56 -05:00
committed by GitHub
parent 07608fc3fb
commit 52d2bc930b

View File

@ -293,7 +293,9 @@ func (api *API) moonsEnabledMW(next http.Handler) http.Handler {
proxy := api.entitlements.Features[codersdk.FeatureWorkspaceProxy].Enabled
api.entitlementsMu.RUnlock()
if !proxy {
httpapi.RouteNotFound(rw)
httpapi.Write(r.Context(), rw, http.StatusForbidden, codersdk.Response{
Message: "External workspace proxies is an Enterprise feature. Contact sales!",
})
return
}