mirror of
https://github.com/coder/coder.git
synced 2025-07-18 14:17:22 +00:00
Updated PreconditionFailed status occurences to more appropriate statuses. (#5513)
This commit is contained in:
@ -110,7 +110,7 @@ func (api *API) deleteTemplate(rw http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
if len(workspaces) > 0 {
|
||||
httpapi.Write(ctx, rw, http.StatusPreconditionFailed, codersdk.Response{
|
||||
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
|
||||
Message: "All workspaces must be deleted before a template can be removed.",
|
||||
})
|
||||
return
|
||||
|
Reference in New Issue
Block a user