@@ -289,14 +289,14 @@ func (api *api) putUserProfile(rw http.ResponseWriter, r *http.Request) {
289
289
responseErrors := []httpapi.Error {}
290
290
if existentUser .Email == params .Email {
291
291
responseErrors = append (responseErrors , httpapi.Error {
292
- Field : "email" ,
293
- Code : "exists " ,
292
+ Field : "email" ,
293
+ Detail : "this value is already in use and should be unique " ,
294
294
})
295
295
}
296
296
if existentUser .Username == params .Username {
297
297
responseErrors = append (responseErrors , httpapi.Error {
298
- Field : "username" ,
299
- Code : "exists " ,
298
+ Field : "username" ,
299
+ Detail : "this value is already in use and should be unique " ,
300
300
})
301
301
}
302
302
httpapi .Write (rw , http .StatusConflict , httpapi.Response {
@@ -591,8 +591,8 @@ func (api *api) postWorkspacesByUser(rw http.ResponseWriter, r *http.Request) {
591
591
httpapi .Write (rw , http .StatusBadRequest , httpapi.Response {
592
592
Message : fmt .Sprintf ("template %q doesn't exist" , createWorkspace .TemplateID .String ()),
593
593
Errors : []httpapi.Error {{
594
- Field : "template_id" ,
595
- Code : "not_found " ,
594
+ Field : "template_id" ,
595
+ Detail : "template not found " ,
596
596
}},
597
597
})
598
598
return
@@ -637,8 +637,8 @@ func (api *api) postWorkspacesByUser(rw http.ResponseWriter, r *http.Request) {
637
637
httpapi .Write (rw , http .StatusConflict , httpapi.Response {
638
638
Message : fmt .Sprintf ("workspace %q already exists in the %q template" , createWorkspace .Name , template .Name ),
639
639
Errors : []httpapi.Error {{
640
- Field : "name" ,
641
- Code : "exists " ,
640
+ Field : "name" ,
641
+ Detail : "this value is already in use and should be unique " ,
642
642
}},
643
643
})
644
644
return
0 commit comments