PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: getmoto/moto (python)
Issue: SQS `delete_message_batch` does not raise exception with no `Entries`
Hello,

When using `delete_message_batch` with an empty `Entries` parameter against AWS, the following exception is raised: 
```
botocore.errorfactory.EmptyBatchRequest: An error occurred (AWS.SimpleQueueService.EmptyBatchRequest) when calling the DeleteMessageBatch operation: There should be at least one DeleteMessageBatchRequestEntry in the request.
```
But no exception is raised with moto

```python
with moto.mock_aws():
    sqs = boto3.client("sqs")
    queue = sqs.create_queue(QueueName="testing-queue")
    sqs.delete_message_batch(
        QueueUrl=queue["QueueUrl"],
        Entries=[],
    )
```

Tested with moto `5.0.13`
Pull request description: SQS: delete_message_batch() now validates there's at least one entry
Fixes #8061 

Patch:
diff --git a/moto/sqs/exceptions.py b/moto/sqs/exceptions.py
index 7207d4488..a7f234e89 100644
--- a/moto/sqs/exceptions.py
+++ b/moto/sqs/exceptions.py
@@ -38,10 +38,10 @@ class QueueAlreadyExists(RESTError):
 class EmptyBatchRequest(RESTError):
     code = 400
 
-    def __init__(self) -> None:
+    def __init__(self, action: str = "Send") -> None:
         super().__init__(
-            "EmptyBatchRequest",
-            "There should be at least one SendMessageBatchRequestEntry in the request.",
+            "AWS.SimpleQueueService.EmptyBatchRequest",
+            f"There should be at least one {action}MessageBatchRequestEntry in the request.",
         )
 
 
diff --git a/moto/sqs/responses.py b/moto/sqs/responses.py
index 8a9e077f5..af546aa63 100644
--- a/moto/sqs/responses.py
+++ b/moto/sqs/responses.py
@@ -489,6 +489,9 @@ class SQSResponse(BaseResponse):
         else:
             receipts = self._get_multi_param("DeleteMessageBatchRequestEntry")
 
+        if not receipts:
+            raise EmptyBatchRequest(action="Delete")
+
         for r in receipts:
             for key in list(r.keys()):
                 if key == "Id":


Test patch:
diff --git a/tests/test_sqs/test_sqs.py b/tests/test_sqs/test_sqs.py
index 7e5410d9f..30bf373d7 100644
--- a/tests/test_sqs/test_sqs.py
+++ b/tests/test_sqs/test_sqs.py
@@ -1972,6 +1972,20 @@ def test_delete_message_batch_with_invalid_receipt_id():
     ]
 
 
+@sqs_aws_verified()
+@pytest.mark.aws_verified
+def test_delete_message_batch_with_zero_entries(queue_name=None, queue_url=None):
+    sqs = boto3.client("sqs", "us-east-1")
+    with pytest.raises(ClientError) as exc:
+        sqs.delete_message_batch(QueueUrl=queue_url, Entries=[])
+    err = exc.value.response["Error"]
+    assert err["Code"] == "AWS.SimpleQueueService.EmptyBatchRequest"
+    assert (
+        err["Message"]
+        == "There should be at least one DeleteMessageBatchRequestEntry in the request."
+    )
+
+
 @mock_aws
 def test_message_attributes_in_receive_message():
     sqs = boto3.resource("sqs", region_name=REGION)