mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-01 20:46:56 +00:00
cql: change exception type when granting incorrect permissions
For compatibility with Cassandra, this patch changes the exception type thrown when trying to alter a permission that is not applicable on the given resource from an Invalid query to a Syntax exception.
This commit is contained in:
@@ -25,7 +25,7 @@ static auth::permission_set filter_applicable_permissions(const auth::permission
|
||||
auto const filtered_permissions = auth::permission_set::from_mask(ps.mask() & r.applicable_permissions().mask());
|
||||
|
||||
if (!filtered_permissions) {
|
||||
throw exceptions::invalid_request_exception(
|
||||
throw exceptions::syntax_exception(
|
||||
format("Resource {} does not support any of the requested permissions.", r));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user