Skip to content

KAFKA-19350 Don't propagate the error caused by CreateTopicPolicy to FatalFaultHandler #19857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

johnny94
Copy link
Contributor

@johnny94 johnny94 commented May 30, 2025

CreateTopicPolicy#validate may throw unexpected exception other than
PolicyViolationException. We should handle this case as well.

@github-actions github-actions bot added triage PRs from the community kraft small Small PRs labels May 30, 2025
Copy link
Collaborator

@Yunyung Yunyung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please correct the PR title and description.

@github-actions github-actions bot removed the triage PRs from the community label Jun 2, 2025
@johnny94 johnny94 changed the title KAFKA-19350 Don't propagate the error caused by CreateTopicPolicy to … KAFKA-19350 Don't propagate the error caused by CreateTopicPolicy to FatalFaultHandler Jun 3, 2025
@@ -871,6 +871,13 @@ private ApiError maybeCheckCreateTopicPolicy(Supplier<CreateTopicPolicy.RequestM
createTopicPolicy.get().validate(supplier.get());
} catch (PolicyViolationException e) {
return new ApiError(Errors.POLICY_VIOLATION, e.getMessage());
} catch (Throwable e) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add test for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants