mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
fix(core): return XML error for missing action and add volume action fallbacks (#1348)
This commit addresses the XML parser error on clients when requests are made without the 'Action' parameter. Previously, it returned a 204 No Content response with an empty body; now it returns a 400 Bad Request status and a structured XML 'MissingAction' error. It also adds missing EC2 volume actions ('CreateVolume', 'DescribeVolumes', 'DeleteVolume') to the unauthenticated fallback list in the query controller.
Closes #1333
This commit is contained in:
1 parent
57d9ef5ad8
commit
1a42aafcfb
2 files changed
+42
-2
No files matched your search
@@ -168,7 +168,8 @@ public class AwsQueryController {
|
||||
"DescribeInstanceTypes", "DescribeInstanceTypeOfferings",
|
||||
"CreateLaunchTemplate", "CreateLaunchTemplateVersion", "DescribeLaunchTemplates", "DescribeLaunchTemplateVersions",
|
||||
"ModifyLaunchTemplate", "DeleteLaunchTemplate",
|
||||
"DescribeNetworkInterfaces"
|
||||
"DescribeNetworkInterfaces",
|
||||
"CreateVolume", "DescribeVolumes", "DeleteVolume"
|
||||
);
|
||||
|
||||
private final CloudFormationQueryHandler cloudFormationQueryHandler;
|
||||
@@ -240,7 +241,8 @@ public class AwsQueryController {
|
||||
|
||||
String action = formParams.getFirst("Action");
|
||||
if (action == null) {
|
||||
return null;
|
||||
return xmlErrorResponse("MissingAction",
|
||||
"The request must contain the parameter Action", 400);
|
||||
}
|
||||
|
||||
String service = resolveService(authorization, action);
|
||||
|
||||
Reference in new issue
Block a user