dcapwell commented on code in PR #4322:
URL: https://github.com/apache/cassandra/pull/4322#discussion_r2283251059


##########
src/java/org/apache/cassandra/service/StorageProxy.java:
##########
@@ -2243,7 +2243,7 @@ public static ConsistencyLevel 
consistencyLevelForAccordRead(ClusterMetadata cm,
     public static IAccordResult<TxnResult> readWithAccord(ClusterMetadata cm, 
PartitionRangeReadCommand command, AbstractBounds<PartitionPosition> range, 
ConsistencyLevel consistencyLevel, Dispatcher.RequestTime requestTime)
     {
         if (consistencyLevel != null && 
!IAccordService.SUPPORTED_READ_CONSISTENCY_LEVELS.contains(consistencyLevel))
-            throw new InvalidRequestException(consistencyLevel + " is not 
supported by Accord");
+            throw 
UnsupportedTransactionConsistencyLevel.read(consistencyLevel);

Review Comment:
   this patch didn't hit this issue, was from 
https://github.com/apache/cassandra/pull/4299 but figured i would keep here.
   
   when you have normal CQL go through `BEGIN TRANSACTION` the error thrown was 
different which broke some tests.  It also was generic error and not a user 
error, so what the client would see was that the server messed up, and not that 
the user sent bad requests.
   
   I also saw a common pattern of these types of checks having their own types, 
so figured i would refactor to fit that pattern as a way to keep this logic 
consistent.



-- 
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]

Reply via email to