Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
6 changes: 4 additions & 2 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 12 additions & 10 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import dev.restate.common.Slice;
import dev.restate.sdk.common.TerminalException;
import dev.restate.sdk.core.statemachine.InvocationState;
import dev.restate.sdk.core.statemachine.StateMachine;
import dev.restate.sdk.endpoint.definition.HandlerDefinition;
import io.opentelemetry.context.Context;
Expand Down Expand Up @@ -174,19 +175,19 @@ private CompletableFuture<Void> end(
HandlerContextInternal contextInternal, @Nullable Throwable exception) {
if (exception == null || ExceptionUtils.containsSuspendedException(exception)) {
contextInternal.close();
} else {
LOG.warn("Error when processing the invocation", exception);
} else if (contextInternal.getInvocationState() != InvocationState.CLOSED) {
if (ExceptionUtils.isTerminalException(exception)) {
LOG.info("Invocation completed with terminal error", exception);
return contextInternal
.writeOutput((TerminalException) exception)
.thenAccept(
v -> {
LOG.trace("Closed correctly with non ok exception", exception);
contextInternal.close();
});
.thenAccept(v -> contextInternal.close());
} else {
// No need to log here, fail inside will log
contextInternal.fail(exception);
}
} else if (!"kotlinx.coroutines.JobCancellationException"
.equals(exception.getClass().getCanonicalName())) {
LOG.warn("Suppressed error after the invocation was closed:", exception);
}
return CompletableFuture.completedFuture(null);
}
Expand Down