From 09349c186225325b5f72e567b45ea22db3e49919 Mon Sep 17 00:00:00 2001 From: Rares Polenciuc Date: Fri, 14 Nov 2025 18:27:36 +0000 Subject: [PATCH] fix: add missing DurableExecutionArn to StopDurableExecution request body - Extract ARN from URL path and include in body_data before parsing - StopDurableExecutionRequest to fix "Request body is required" error. --- .../web/handlers.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/aws_durable_execution_sdk_python_testing/web/handlers.py b/src/aws_durable_execution_sdk_python_testing/web/handlers.py index 465731b..0f4744f 100644 --- a/src/aws_durable_execution_sdk_python_testing/web/handlers.py +++ b/src/aws_durable_execution_sdk_python_testing/web/handlers.py @@ -387,14 +387,16 @@ def handle(self, parsed_route: Route, request: HTTPRequest) -> HTTPResponse: HTTPResponse: The HTTP response to send to the client """ try: - body_data: dict[str, Any] = self._parse_json_body(request) - stop_request: StopDurableExecutionRequest = ( - StopDurableExecutionRequest.from_dict(body_data) - ) + body_data: dict[str, Any] = self._parse_json_body_optional(request) stop_route = cast(StopDurableExecutionRoute, parsed_route) execution_arn: str = stop_route.arn + body_data["DurableExecutionArn"] = execution_arn + stop_request: StopDurableExecutionRequest = ( + StopDurableExecutionRequest.from_dict(body_data) + ) + stop_response: StopDurableExecutionResponse = self.executor.stop_execution( execution_arn, stop_request.error )