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 )