Skip to content

Commit 3ebf2d3

Browse files
committed
update disabled message and use http 403 instead of 404
1 parent 17fa155 commit 3ebf2d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

agent/api.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ func (a *agent) apiHandler() (http.Handler, func() error) {
5656
r.Mount("/api/v0/containers", a.containerAPI.Routes())
5757
} else {
5858
r.HandleFunc("/api/v0/containers", func(w http.ResponseWriter, r *http.Request) {
59-
httpapi.Write(r.Context(), w, http.StatusNotFound, codersdk.Response{
59+
httpapi.Write(r.Context(), w, http.StatusForbidden, codersdk.Response{
6060
Message: "Container API is not enabled.",
61-
Detail: "Set the --experimental-devcontainers flag to enable the container API.",
61+
Detail: "Set the CODER_AGENT_DEVCONTAINERS_ENABLE environment variable or use the --devcontainers-enable flag on the agent to enable the container API.",
6262
})
6363
})
6464
}

0 commit comments

Comments
 (0)