You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that something is being sent after the response is sent with Context.send() in CompletionStage.
Can the process here in io.jooby.internal.handler.apply() be changed?
} else if (result instanceof CompletionStage future) {
future.whenComplete(
(value, x) -> {
// Add the following if statement
if (ctx.isResponseStarted()) {
return;
}
try {
Route.After after = ctx.getRoute().getAfter();
if (after != null) {
// run after:
after.apply(ctx, value, unwrap((Throwable) x));
}
if (x != null) {
Throwable exception = unwrap((Throwable) x);
ctx.sendError(exception);
} else {
ctx.render(value);
}
} catch (Throwable cause) {
ctx.sendError(cause);
}
});
// Return context to mark as handled
return ctx;
}
The text was updated successfully, but these errors were encountered:
jknack
changed the title
CompletionStage: Context.send() in CompletionStage raises Exception
reactive: Reactive types must support side-effect handlers
Aug 1, 2024
It seems that something is being sent after the response is sent with Context.send() in CompletionStage.
Can the process here in
io.jooby.internal.handler.apply()
be changed?The text was updated successfully, but these errors were encountered: