yifan-c commented on code in PR #60:
URL: https://github.com/apache/cassandra-sidecar/pull/60#discussion_r1260225023
##########
src/main/java/org/apache/cassandra/sidecar/utils/HttpExceptions.java:
##########
@@ -54,7 +54,7 @@ public static HttpException cassandraServiceUnavailable()
*/
public static HttpException wrapHttpException(HttpResponseStatus status,
Throwable cause)
{
- return wrapHttpException(status, null, cause);
+ return wrapHttpException(status, cause != null ? cause.getMessage() :
null, cause);
Review Comment:
I would against passing the cause message as the response payload. The
message is internal to server and probably does not make sense to the client,
or even not desired to be exposed.
In the scenario where payload is needed, it should set the response message
payload explicitly.
--
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]