Skip to content

Commit 0761a6a

Browse files
committed
chore: amend invalid execution payload err msg
1 parent e92a341 commit 0761a6a

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/aws_durable_execution_sdk_python/execution.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ def wrapper(event: Any, context: LambdaContext) -> MutableMapping[str, Any]:
228228
invocation_input = DurableExecutionInvocationInput.from_dict(event)
229229
except (KeyError, TypeError, AttributeError) as e:
230230
msg = (
231-
"The payload is not the correct Durable Function input. "
232-
"Please set DurableConfig on the AWS Lambda to invoke it as a Durable Function."
231+
"Unexpected payload provided to start the durable execution. "
232+
"Check your resource configurations to confirm the durability is set."
233233
)
234234
raise ExecutionError(msg) from e
235235

tests/execution_test.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,7 +2000,10 @@ def test_handler(event: Any, context: DurableContext) -> dict:
20002000
# THEN it raises a ValueError with a helpful message
20012001
with pytest.raises(
20022002
ExecutionError,
2003-
match="The payload is not the correct Durable Function input",
2003+
match=(
2004+
"Unexpected payload provided to start the durable execution. "
2005+
"Check your resource configurations to confirm the durability is set."
2006+
),
20042007
):
20052008
test_handler(regular_event, lambda_context)
20062009

@@ -2028,6 +2031,9 @@ def test_handler(event: Any, context: DurableContext) -> dict:
20282031
# THEN it raises a ValueError with a helpful message
20292032
with pytest.raises(
20302033
ExecutionError,
2031-
match="The payload is not the correct Durable Function input",
2034+
match=(
2035+
"Unexpected payload provided to start the durable execution. "
2036+
"Check your resource configurations to confirm the durability is set."
2037+
),
20322038
):
20332039
test_handler(non_dict_event, lambda_context)

0 commit comments

Comments
 (0)