Places the CommonResponse struct at the *end* of all IAM responses. (#8537)

* Places the CommonResponse struct at the end of all IAM responses, rather than the start.

* iam: fix error response request id layout

* iam: add XML ordering regression test

* iam: share request id generation

---------

Co-authored-by: Aaron Segal <aaron.segal@rpsolutions.com>
Co-authored-by: Chris Lu <chris.lu@gmail.com>
This commit is contained in:
Aaron
2026-03-06 15:53:23 -05:00
committed by GitHub
parent f9311a3422
commit 14cd0f53ba
8 changed files with 106 additions and 33 deletions

View File

@@ -244,6 +244,8 @@ func TestPutUserPolicyError(t *testing.T) {
assert.Equal(t, expectedMessage, message)
assert.Equal(t, expectedCode, code)
assert.Contains(t, response.Body.String(), "<RequestId>")
assert.NotContains(t, response.Body.String(), "<ResponseMetadata>")
}
func extractErrorCodeAndMessage(response *httptest.ResponseRecorder) (string, string) {