Skip to content

fix: throw IllegalStateException when validation of thread type fail#477

Open
zhongkechen wants to merge 1 commit into
mainfrom
exception
Open

fix: throw IllegalStateException when validation of thread type fail#477
zhongkechen wants to merge 1 commit into
mainfrom
exception

Conversation

@zhongkechen

@zhongkechen zhongkechen commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

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

Fix #455

Description

When a user calls a durable method from the wrong thread, e.g. calling durableFuture.get() from a step ,
currently IllegalDurableOperationException is thrown and the execution is immediately terminated.

IllegalDurableOperationException is supposed to be used in critical situation, e.g. SDK bugs or API bugs. Validation errors like above is user triggered and we shouldn't use IllegalDurableOperationException in this case.

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?

Integration Tests

Have integration tests been written for these changes?

Examples

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

@zhongkechen zhongkechen requested a review from a team June 19, 2026 19:18
@zhongkechen zhongkechen self-assigned this Jun 19, 2026
@zhongkechen zhongkechen added the BREAKING Something that is going to break existing users label Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BREAKING Something that is going to break existing users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: IllegalDurableOperationException when context validation fails

1 participant