chore: include error detail for ui error display (#14837)

Not including an error detail asks the user to check the dev console.
Which is unhelpful in this expected situation
This commit is contained in:
Steven Masley
2024-09-26 11:48:50 -05:00
committed by GitHub
parent e4470e1617
commit 3894bab038
+1
View File
@@ -211,6 +211,7 @@ func (api *API) putMemberRoles(rw http.ResponseWriter, r *http.Request) {
if apiKey.UserID == member.OrganizationMember.UserID {
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
Message: "You cannot change your own organization roles.",
Detail: "Another user with the appropriate permissions must change your roles.",
})
return
}