Skip to content

Commit 3894bab

Browse files
authored
chore: include error detail for ui error display (coder#14837)
Not including an error detail asks the user to check the dev console. Which is unhelpful in this expected situation
1 parent e4470e1 commit 3894bab

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

coderd/members.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ func (api *API) putMemberRoles(rw http.ResponseWriter, r *http.Request) {
211211
if apiKey.UserID == member.OrganizationMember.UserID {
212212
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
213213
Message: "You cannot change your own organization roles.",
214+
Detail: "Another user with the appropriate permissions must change your roles.",
214215
})
215216
return
216217
}

0 commit comments

Comments
 (0)