mirror of
https://github.com/coder/coder.git
synced 2026-06-03 04:58:23 +00:00
c33812a430
When a user creates a workspace, opens the web terminal, then the workspace stops but the web terminal remains open the web terminal will retry the connection. Coder will issue a HTTP 502 Bad Gateway response when this occurs because coderd cannot connect to the workspace agent, however this is problematic as any load balancer sitting in front of Coder sees a 502 and thinks Coder is unhealthy. The main change is in https://github.com/coder/coder/pull/23090/changes#diff-bbe3b56ed3532289481a0e977867cd15048b7ca718ce676aae3f3332378eebc2R97, however the main test and downstream tests are also updated. This PR changes the response to a [HTTP 404](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/404) after internal discussion. <img width="1832" height="1511" alt="image" src="https://github.com/user-attachments/assets/0baff80d-bb98-4644-89cd-e80c87947098" /> Created with the help of Mux, reviewed and tested by a human