Demogorgon314 commented on pull request #13420:
URL: https://github.com/apache/pulsar/pull/13420#issuecomment-1000063625


   > Pulsar did not create this resource in metadata, so throw the 
`MetadataStoreException.NotFoundException`.
   
   Exactly. So we can catch the `MetadataStoreException.NotFoundException` like 
this.
   
   ```java
   private synchronized void deleteDynamicConfigurationOnZk(String configName) {
     try {
         // ...
     } catch (RestException re) {
         throw re;
     } catch (MetadataStoreException.NotFoundException ex) {
         LOG.info("xxx");
     } catch (Exception ie) {
         LOG.error("[{}] Failed to update configuration {}, {}", clientAppId(), 
configName, ie.getMessage(), ie);
         throw new RestException(ie);
     }
   }
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to