mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
refactor: replace Code by Detail in the http API error (#1011)
This commit is contained in:
@@ -162,8 +162,8 @@ func (api *api) postTemplatesByOrganization(rw http.ResponseWriter, r *http.Requ
|
||||
httpapi.Write(rw, http.StatusConflict, httpapi.Response{
|
||||
Message: fmt.Sprintf("template %q already exists", createTemplate.Name),
|
||||
Errors: []httpapi.Error{{
|
||||
Field: "name",
|
||||
Code: "exists",
|
||||
Field: "name",
|
||||
Detail: "this value is already in use and should be unique",
|
||||
}},
|
||||
})
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user