From 7e92bcfafb2eebbc8ffa9e9a8e3b570d4cb7d3cf Mon Sep 17 00:00:00 2001 From: Alex Arslan Date: Mon, 8 Jul 2024 08:39:29 -0700 Subject: [PATCH] Fix failures in IAM tests (#691) The test is expecting an `AWSException` with code `"InvalidAction"` but the caught exception had code 404. It appears to be because the response body is XML but AWS didn't set the `Content-Type` header nor did it begin the response body with a clear indicator of the content type, so the body doesn't get properly parsed. To fix this, we can expand the set of things we look for to determine when to parse as XML. Previously we were only looking for `/xml` at the end of the content or ` 0