Skip to content

Conversation

@Quinn-With-Two-Ns
Copy link
Contributor

Throw clear error if workflow stub is misused

closes #746

@Quinn-With-Two-Ns Quinn-With-Two-Ns requested a review from a team as a code owner June 3, 2025 15:36

private void assertSameWorkflow() {
if (activityExecutor != WorkflowInternal.getWorkflowOutboundInterceptor()) {
throw new IllegalStateException(
Copy link
Member

Choose a reason for hiding this comment

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

What happened before this code was added? Did things work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See the linked issue, it would be some cryptic error message

 io.temporal.failure.ApplicationFailure: message='Operation allowed only while eventLoop is running', type='java.lang.IllegalStateException', nonRetryable=false 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants