refactor: replace Code by Detail in the http API error (#1011)

This commit is contained in:
Bruno Quaresma
2022-04-18 11:02:54 -05:00
committed by GitHub
parent 9faa39aa23
commit 3311c2f65d
6 changed files with 18 additions and 18 deletions

View File

@ -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