Skip to content

Conversation

@hohwille
Copy link
Member

@hohwille hohwille added bug Something isn't working enhancement New feature or request service service-layer (REST, SOAP, etc.) labels Dec 17, 2020
@hohwille hohwille added this to the release:2020.12.001 milestone Dec 17, 2020
@hohwille
Copy link
Member Author

hohwille commented Dec 17, 2020

We could still invoke the errorHandler before throwing the exception in the CompletableFuture.
Any thoughts on this design from others?
Currently this is not the case and I updated the JavaDoc to explain the behaviour. We could change this now if we think this would be better. If we do change this, the errorHandler implementation needs to be thread-safe.

As CompletableFuture by design throws a checked ExecutionException the user is forced to handle errors anyway. Therefore, I think my change here is suitable and makes sense.

@hohwille hohwille merged commit 43b56bc into devonfw:develop Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request service service-layer (REST, SOAP, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CompletableFuture returns null if service failed instead of raising exception

3 participants