RobertIndie commented on a change in pull request #12719:
URL: https://github.com/apache/pulsar/pull/12719#discussion_r747331212
##########
File path:
pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/BaseResource.java
##########
@@ -267,7 +267,7 @@ public PulsarAdminException getApiException(Response
response) {
public static String getReasonFromServer(WebApplicationException e) {
try {
- return
e.getResponse().readEntity(ErrorData.class).reason.toString();
Review comment:
If we remove the `toString` call here, the `reason` may be null and be
returned. We need to make sure that null is not returned here. The correct
behavior is to return e.getMessage() when the `reason` is null.
--
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]