Skip to content

feat(sdk): add user-friendly error for non-durable functions#424

Merged
nvasiu merged 1 commit into
mainfrom
non-durable-error-message
Jun 4, 2026
Merged

feat(sdk): add user-friendly error for non-durable functions#424
nvasiu merged 1 commit into
mainfrom
non-durable-error-message

Conversation

@nvasiu
Copy link
Copy Markdown
Contributor

@nvasiu nvasiu commented Jun 4, 2026

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Issue Link, if available

#385

Description

  • Added a check for when the SDK is run in a non-durable function, and throw a more user-friendly error message.
  • Also added a test for this check.

Durable functions must have DurableConfig set up, and their invocation payloads will always include a DurableExecutionArn and CheckpointToken. If those values are missing, then the function does not have DurableConfig set up, so it is non-durable.

Demo/Screenshots

Checklist

  • I have filled out every section of the PR template
  • I have thoroughly tested this change

Testing

Unit Tests

Have unit tests been written for these changes? YES

Integration Tests

Have integration tests been written for these changes? N/A

Examples

Has a new example been added for the change? (if applicable) N/A

@nvasiu nvasiu requested a review from a team June 4, 2026 00:18
Copy link
Copy Markdown
Contributor

@zhongkechen zhongkechen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spotless failed

Comment thread sdk/src/main/java/software/amazon/lambda/durable/DurableHandler.java Outdated
@nvasiu nvasiu force-pushed the non-durable-error-message branch from d2ab272 to 552fe74 Compare June 4, 2026 18:01
@nvasiu nvasiu force-pushed the non-durable-error-message branch from 552fe74 to a60ab50 Compare June 4, 2026 18:03
@nvasiu nvasiu merged commit d8fd15d into main Jun 4, 2026
11 checks passed
@nvasiu nvasiu deleted the non-durable-error-message branch June 4, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants