Skip to content
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

fix un-correct tips for create topic error when namespace not exist #9223

Merged
merged 1 commit into from Jan 18, 2021

Conversation

aloyszhang
Copy link
Contributor

Fixes #9220

Motivation

fix un-correct tips for create topic error when namespace not exist

@aloyszhang
Copy link
Contributor Author

/pulsarbot run-failure-checks

1 similar comment
@jiazhai
Copy link
Member

jiazhai commented Jan 17, 2021

/pulsarbot run-failure-checks

@aloyszhang
Copy link
Contributor Author

/pulsarbot run-failure-checks

@jiazhai jiazhai merged commit 39dc24b into apache:master Jan 18, 2021
@jiazhai jiazhai added this to the 2.8.0 milestone Jan 18, 2021
@@ -321,6 +321,9 @@ protected void validateGlobalNamespaceOwnership(String property, String namespac
} catch (IllegalArgumentException e) {
throw new RestException(Status.PRECONDITION_FAILED, "Tenant name or namespace is not valid");
} catch (RestException re) {
if (re.getResponse().getStatus() == Status.NOT_FOUND.getStatusCode()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@jiazhai @aloyszhang

thanks for providing a fix to my issue.

I am not sure I understand why we are converting all of the RestExceptions to "Namespace does not have any clusters configured"
what about 5xx errors ("Internal server error") ?

probably we should forward to PRECONDITION_FAILED only under specific circumstances.

@aloyszhang aloyszhang deleted the ns-noexist branch January 22, 2021 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong error message while creating a topic to a non existing namespace
3 participants