tursodatabase / libsql-shell-go

7 stars 7 forks source link

Missing auth token in URL against a Turso db yields confusing error "failed to execute SQL: SELECT 1; invalid character 'T' looking for beginning of value" #142

Open CodingDoug opened 12 months ago

CodingDoug commented 12 months ago
$ go run cmd/libsql-shell/main.go libsql://my-db-my-gh.turso.io/
Error: failed to connect to database. err: failed to execute SQL: SELECT 1;
invalid character 'T' looking for beginning of value
exit status 1

But this works:

$ go run cmd/libsql-shell/main.go libsql://my-db-my-gh.turso.io/?authToken=`turso db tokens create my-db`

The problem occurs with both https and libsql URLs on a Turso database.