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 (#20846)
  • Loading branch information
Demogorgon314 authored and Technoboy- committed Aug 17, 2023
1 parent 3596f5b commit ec7bd2a
Showing 1 changed file with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -463,25 +463,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 ec7bd2a

Please sign in to comment.