Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe unify long poll timeout error with UncompletedException for getResultsWithWait api #202

Open
longquanzheng opened this issue Jul 31, 2023 · 1 comment

Comments

@longquanzheng
Copy link
Contributor

longquanzheng commented Jul 31, 2023

Today the withWait api will throw client side exception with long poll timeout sub status . Because this is a 4xx error from server.

Assertions.assertEquals(ErrorSubStatus.LONG_POLL_TIME_OUT_SUB_STATUS, e.getErrorSubStatus());

However, tryGetting api will throw UncompletedException.

this inconsistency could be a bit confusing.

@longquanzheng
Copy link
Contributor Author

longquanzheng commented Jul 31, 2023

Idea 1:

  • Throw WorkflowAbnormalExitException for failure/timeout/canceld/terminated (this naming is consistent with our naming for IdReusePolicy. ALLOW_IF_PREVIOUS_EXITS_ABNORMALLY
  • Throw WorkflowStillRunningException for long poll timeout in getSimpleResultWithWait , or still running for tryGettingSimpleResult

We may be able to keep backward compatibility:

  • Change WorkflowUncompletedException to an interface
  • WorkflowAbnormalExitException and WorkflowStillRunningException both implement from the interface and extend from ClientSideException

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

No branches or pull requests

1 participant