[go: nahoru, domu]

Skip to content

Commit

Permalink
[improve][broker] Avoid print redirect exception log when get list fr…
Browse files Browse the repository at this point in the history
…om bundle (apache#20846)
  • Loading branch information
Demogorgon314 committed Jul 23, 2023
1 parent 3c82d27 commit 9256407
Showing 1 changed file with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -467,25 +467,20 @@ public void getListFromBundle(
}
asyncResponse.resume(topicList);
}).exceptionally(ex -> {
Throwable realCause = FutureUtil.unwrapCompletionException(ex);
log.error("[{}] Failed to list topics on namespace bundle {}/{}", clientAppId(),
namespaceName, bundleRange, realCause);
if (realCause instanceof WebApplicationException) {
asyncResponse.resume(realCause);
} else {
asyncResponse.resume(new RestException(realCause));
if (!isRedirectException(ex)) {
log.error("[{}] Failed to list topics on namespace bundle {}/{}", clientAppId(),
namespaceName, bundleRange, ex);
}
resumeAsyncResponseExceptionally(asyncResponse, ex);
return null;
});
}
}).exceptionally(ex -> {
log.error("[{}] Failed to list topics on namespace bundle {}/{}", clientAppId(),
namespaceName, bundleRange, ex);
if (ex.getCause() instanceof WebApplicationException) {
asyncResponse.resume(ex.getCause());
} else {
asyncResponse.resume(new RestException(ex.getCause()));
if (!isRedirectException(ex)) {
log.error("[{}] Failed to list topics on namespace bundle {}/{}", clientAppId(),
namespaceName, bundleRange, ex);
}
resumeAsyncResponseExceptionally(asyncResponse, ex);
return null;
});
}
Expand Down

0 comments on commit 9256407

Please sign in to comment.