You can get this error if you create a BSON/JSON index entry where the key size is so large that it would need to be written to a smart blob (for keys larger than about 4KiB). You cannot create an index on such large keys.
You have violated one of the following constraints on the cluster key that is specified in the ON clause of the CREATE OPTICAL CLUSTER statement:
* The number of columns included in a composite cluster key exceeds 16.
* The length of a CHARACTER column exceeds 256 bytes.