Skip to content

Commit de797e6

Browse files
committed
chore: unauthorized -> forbidden for non authentication failures
1 parent b2f5073 commit de797e6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

coderd/workspaceapps/proxy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ func (s *Server) handleAPIKeySmuggling(rw http.ResponseWriter, r *http.Request,
256256
func (s *Server) workspaceAppsProxyPath(rw http.ResponseWriter, r *http.Request) {
257257
if s.DisablePathApps {
258258
site.RenderStaticErrorPage(rw, r, site.ErrorPageData{
259-
Status: http.StatusUnauthorized,
260-
Title: "Unauthorized",
259+
Status: http.StatusForbidden,
260+
Title: "Forbidden",
261261
Description: "Path-based applications are disabled on this Coder deployment by the administrator.",
262262
RetryEnabled: false,
263263
DashboardURL: s.DashboardURL.String(),

coderd/workspaces.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ func (api *API) postWorkspacesByOrganization(rw http.ResponseWriter, r *http.Req
359359
}
360360

361361
if organization.ID != template.OrganizationID {
362-
httpapi.Write(ctx, rw, http.StatusUnauthorized, codersdk.Response{
362+
httpapi.Write(ctx, rw, http.StatusForbidden, codersdk.Response{
363363
Message: fmt.Sprintf("Template is not in organization %q.", organization.Name),
364364
})
365365
return

0 commit comments

Comments
 (0)