fix: api error message (#38031)

Fix various abuses and mistakes
This commit is contained in:
wxiaoguang authored and GitHub committed 2026-06-08 16:58:42 +08:00
1 parent 60f66a9bfd
commit 136f7d18aa
27 files changed
+80 -256

No files matched your search

+1 -3
View File
@@ -151,9 +151,7 @@ func testUnknownOrganization(t *testing.T) {
req := NewRequest(t, "GET", "/api/v1/users/user1/orgs/unknown/permissions").
AddTokenAuth(token)
resp := MakeRequest(t, req, http.StatusNotFound)
apiError := DecodeJSON(t, resp, &api.APIError{})
assert.Equal(t, "GetUserByName", apiError.Message)
MakeRequest(t, req, http.StatusNotFound)
}
func testHiddenMemberPermissionsForbidden(t *testing.T) {