You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "mattisonchao (via GitHub)" <gi...@apache.org> on 2023/03/21 13:14:00 UTC

[GitHub] [pulsar] mattisonchao commented on a diff in pull request #19879: [fix] [admin] Make response code to 400 instead of 500 when delete topic fails due to enabled geo-replication

mattisonchao commented on code in PR #19879:
URL: https://github.com/apache/pulsar/pull/19879#discussion_r1143354200


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/PersistentTopics.java:
##########
@@ -1106,7 +1106,9 @@ public void deleteTopic(
                         ex = new RestException(Response.Status.PRECONDITION_FAILED,
                                 t.getMessage());
                     }
-                    if (isManagedLedgerNotFoundException(t)) {
+                    if (t instanceof IllegalStateException){

Review Comment:
   IMO, the common exception `IllegalStateException` is not good here. we can't identify what happened here. maybe we can improve it in the future?



-- 
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