mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: correct 500 -> 404 on workspace agent mw (#11129)
* chore: correct 500 -> 404
This commit is contained in:
@@ -78,6 +78,10 @@ func (api *API) workspaceAgent(rw http.ResponseWriter, r *http.Request) {
|
||||
return err
|
||||
})
|
||||
err := eg.Wait()
|
||||
if httpapi.Is404Error(err) {
|
||||
httpapi.ResourceNotFound(rw)
|
||||
return
|
||||
}
|
||||
if err != nil {
|
||||
httpapi.Write(ctx, rw, http.StatusInternalServerError, codersdk.Response{
|
||||
Message: "Internal error fetching workspace agent.",
|
||||
|
||||
Reference in New Issue
Block a user