dcapwell commented on code in PR #4518:
URL: https://github.com/apache/cassandra/pull/4518#discussion_r2604049073
##########
src/java/org/apache/cassandra/cql3/statements/TransactionStatement.java:
##########
@@ -250,7 +250,7 @@ TxnNamedRead createNamedRead(NamedSelect namedSelect,
QueryOptions options, Tabl
SinglePartitionReadQuery.Group<SinglePartitionReadCommand> selectQuery
= (SinglePartitionReadQuery.Group<SinglePartitionReadCommand>)
select.getQuery(options, 0);
if (selectQuery.queries.size() != 1)
- throw new IllegalArgumentException("Within a transaction, SELECT
statements must select a single partition; found " + selectQuery.queries.size()
+ " partitions");
+ throw invalidRequest("Within a transaction, SELECT statements must
select a single partition; found " + selectQuery.queries.size() + "
partitions");
Review Comment:
`IllegalArgumentException` is "server error" to users, so need
`invalidRequest` to let the user know their query is at fault
--
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]