dyerc / craft-flux

Craft CMS plugin which integrates with AWS Lambda and CloudFront to process, cache and serve images
https://cdyer.co.uk/plugins/flux
Other
4 stars 2 forks source link

Malformed XML error when attempting to "Purge Transformed Assets" #6

Closed markdrzy closed 1 year ago

markdrzy commented 1 year ago

If an empty Objects array is sent in a deleteObjects request, AWS will respond with a malformed request error:

Error executing "DeleteObjects" on "https://REDACTED.s3.amazonaws.com/?delete";

AWS HTTP error: Client error: `POST https://REDACTED.s3.amazonaws.com/?delete` resulted in a `400 Bad Request` response:

MalformedXML (client): The XML you provided was not well-formed or did not validate against our published schema - 

<?xml version="1.0" encoding="UTF-8"?>
<Error>
    <Code>MalformedXML</Code>
    <Message>The XML you provided was not well-formed or did not validate against our published schema</Message>
    <RequestId>REDACTED</RequestId>
    <HostId>REDACTED</HostId>
</Error>