skoppu22 commented on code in PR #152:
URL: https://github.com/apache/cassandra-sidecar/pull/152#discussion_r1878348474
##########
server/src/main/java/org/apache/cassandra/sidecar/routes/AbstractHandler.java:
##########
@@ -331,4 +334,34 @@ public static String extractHostAddressWithoutPort(String
address)
}
return address;
}
+
+ protected StorageOperations getStorageOperations(String host)
+ {
+ CassandraAdapterDelegate delegate =
this.metadataFetcher.delegate(host);
+ StorageOperations storageOperations = delegate == null ? null :
delegate.storageOperations();
+ if (storageOperations == null)
+ {
+ throw cassandraServiceUnavailable();
Review Comment:
cassandraServiceUnavailable currently says "Cassandra service is
unavailable". The same message goes back in client's response. As this is an
internal error, adding further info may leak internal info to the client. We
use the same cassandraServiceUnavailable almost everywhere without adding
further details, must be the same reason I am assuming.
Any other kind of exception is caught in AbstractHandler's handle() and
logged and updated in the response.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]