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:
Wojciech Mitros
2023-03-16 12:48:28 +01:00
parent 9c36c0313a
commit 53af79442d

View File

@@ -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));
}