DB get error: `key` parameter expected to be a string or Buffer

I’m attempting to find a document the the key, but I keep getting an error: DB get error: key parameter expected to be a string or Buffer. I’ve tried the parameter syntax, interpolation, straight lining the key, but it always give the same error.

const result = await CLUSTER.query(`SELECT * FROM bucketname USE KEYS $1`, {
    parameters: [id],
}

Thanks

Its about your KEYS , try passing them as a string (in quotes)

as an example if you are NOT parameterizing it, your query will look something like this

SELECT *
FROM `travel-sample`
USE KEYS ["airport_1254","airport_1255"];