tursodatabase/turso · error · TypeError
Expected first argument to be a string
Error message
Expected first argument to be a string
What it means
Error "Expected first argument to be a string" thrown in tursodatabase/turso.
Source
Thrown at bindings/javascript/packages/common/promise.ts:553
* Prepares the SQL and executes it as `Statement.iterate`, yielding each row.
*
* @param {string} sql - The SQL statement string.
* @param {...any} bindParameters - Bind parameters, optionally followed by a query options object.
*/
async *iterate(sql, ...bindParameters) {
const stmt = await this.prepare(sql);
try {
yield* stmt.iterate(...bindParameters);
} finally {
await stmt.close();
}
}
async pragma(source, options) {
if (options == null) options = {};
if (typeof source !== "string")
throw new TypeError("Expected first argument to be a string");
if (typeof options !== "object")
throw new TypeError("Expected second argument to be an options object");
const pragma = `PRAGMA ${source}`;
const stmt = await this.prepare(pragma);
try {
const results = await stmt.all();
return results;
} finally {
await stmt.close();
}
}
backup(filename, options) {
throw new Error("not implemented");
}View on GitHub (pinned to bad083fafb)
When it happens
Trigger: Thrown at bindings/javascript/packages/common/promise.ts:553 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tursodatabase/turso@bad083fafb (2026-08-16).
Data as JSON: /api/errors/81609f51d2557d62.
Report an issue: GitHub.