You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/11/22 14:40:14 UTC

[GitHub] [pulsar] hangc0276 commented on a change in pull request #12919: [Broker] Change create topic return error to Status.BAD_REQUEST

hangc0276 commented on a change in pull request #12919:
URL: https://github.com/apache/pulsar/pull/12919#discussion_r754339783



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
##########
@@ -3694,7 +3694,7 @@ private Topic getTopicReference(TopicName topicName) {
             throw e;
         } catch (Exception e) {
             if (e.getCause() instanceof NotAllowedException) {
-                throw new RestException(Status.CONFLICT, e.getCause());
+                throw new RestException(Status.BAD_REQUEST, e.getCause());

Review comment:
       +1

##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
##########
@@ -250,7 +250,7 @@ protected void validateAdminAndClientPermission() {
     protected void validateCreateTopic(TopicName topicName) {
         if (isTransactionInternalName(topicName)) {
             log.warn("Try to create a topic in the system topic format! {}", topicName);

Review comment:
       change the log.warn information to `log.warn("Forbidden to create transaction internal topic: {}" topicName)`  maybe more clear.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org