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

Improve LRO's Error Message on Timeout #1858

Closed
lqiu96 opened this issue Jul 18, 2023 · 1 comment · Fixed by #2236
Closed

Improve LRO's Error Message on Timeout #1858

lqiu96 opened this issue Jul 18, 2023 · 1 comment · Fixed by #2236
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@lqiu96
Copy link
Contributor

lqiu96 commented Jul 18, 2023

We should provide customers a more detailed error message when there is a timeout for LROs. Customers are seeing CancellationException with no message or additional info and have no idea how to proceed. It may be perceived as an error on their end when it is just a timeout from Gax. We should specify that they can try to update the Retry configurations.

Possible fix:
Update the CancellationException() to throw a more detailed error message:

(Stretch)
Update the google-cloud-java README docs with more information and link it from the CancellationException.

@lqiu96 lqiu96 added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Jul 18, 2023
@lqiu96 lqiu96 changed the title Improve LRO's Error Message on Exception Improve LRO's Error Message on Timeout Jul 18, 2023
@lqiu96 lqiu96 self-assigned this Jul 18, 2023
@lqiu96 lqiu96 removed their assignment Sep 11, 2023
@diegomarquezp diegomarquezp self-assigned this Sep 11, 2023
@diegomarquezp
Copy link
Contributor

diegomarquezp commented Nov 2, 2023

Finding: The task was cancelled. comes from guava. Apparently the OperationTimedPollAlgorithm exception would bubble up if it failed instead of getting cancelled. AbstractApiFuture is an abstract implementation of this class.

edit:
Apparently, falling back to guava's cancellation workflow is by default in BasicRetryingFuture

if (throwable instanceof CancellationException) {
NonCancellableFuture<ResponseT> future = new NonCancellableFuture<>();
future.cancelPrivately();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
2 participants