fix exception cast error
Fixes
### Motivation
fix exception cast error
@@ -697,7 +697,7 @@ public abstract class AdminResource extends PulsarWebResource {
return pulsar.getBrokerService().fetchPartitionedTopicMetadataAsync(topicName).get();
} catch (Exception e) {
if (e.getCause() instanceof RestException) {
- throw (RestException) e;
+ throw (RestException) e.getCause();
}
throw new RestException(e);
}
@@ -710,7 +710,7 @@ public abstract class AdminResource extends PulsarWebResource {
.get();
} catch (Exception e) {
if (e.getCause() instanceof RestException) {
- throw (RestException) e;
+ throw (RestException) e.getCause();
}
throw new RestException(e);
}
