You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue when calling the API of cloudfront. I called a POST API and got a 400 http error code. I print the log of request body in the execute.lua:
<?xml version="1.0"?>
<ErrorResponse xmlns="http://cloudfront.amazonaws.com/doc/2020-05-31/">
<Error>
<Type>Sender</Type>
<Code>MalformedInput</Code>
<Message>input is not valid, expected ResponseHeadersPolicyConfig</Message>
</Error>
<RequestId>cd10f090-22eb-41b3-94df-4264f9d45402</RequestId>
</ErrorResponse>
Then I checked the AWS REST API document, just found that request body shouldn't have the root input tag.
The input tag come from the raw-api api-description files. After I changed the code to remove the input tag, the call succeed.
build.lua#232
-- encode rest of the body data here
-- poor_mans_xml_encoding(xml_data, operation.input, "input", body_tbl)
for name, member in pairs(operation.input.members) do
if body_tbl[name] then
poor_mans_xml_encoding(xml_data, member, name, body_tbl[name], 0)
end
end
But I'm not sure if I missed something else.
The text was updated successfully, but these errors were encountered:
I encountered an issue when calling the API of cloudfront. I called a POST API and got a 400 http error code. I print the log of request body in the execute.lua:
And the response body returned by AWS server:
Then I checked the AWS REST API document, just found that request body shouldn't have the root
input
tag.The
input
tag come from the raw-api api-description files. After I changed the code to remove the input tag, the call succeed.But I'm not sure if I missed something else.
The text was updated successfully, but these errors were encountered: