404 Not Found: 404 Not Found: unknown database or endpoint
No database exists at the URL: the name is wrong, it was deleted, or the URL points at the wrong host.
- Error
404 Not Found- Categoría
- Remote server and Hrana errors
Qué significa
A 404 from a remote libSQL connection means the server has no database at that address. The request itself was fine; the target was not. The usual forms: a typo in the database name in the libsql:// URL, a database deleted while an old URL is still configured, an environment mixup where staging points at a dropped database, or a platform API call to a name that does not exist. The libsql JS client surfaces this as SERVER_ERROR: Server returned HTTP status 404.
Causas comunes
- The database name in the URL is misspelled.
- The database was destroyed and the URL is stale.
- The URL belongs to another environment or organization.
- A platform API call names a database or resource that does not exist.
Find the cause
Run `turso db list`. If the name is missing, the URL is stale or wrong. If it is present, compare `turso db show <name> --url` character by character with the URL in your config: libsql URLs are `<db>-<org>.turso.io`, so a wrong org slug produces a valid-looking URL with nothing behind it. A 404 on one environment but not another usually means the database exists in one org only.
Cómo solucionarlo
-
List your databases and compare with the URL your client uses:
turso db list
-
Get the exact connect string for the database and paste it into your config verbatim:
turso db show mydb --url
-
If the database is gone, recreate it, then re-apply your schema:
turso db create mydb turso db shell mydb < schema.sql
-
Reproduce the request shape by hand to see the raw status:
curl -s -o /dev/null -w '%{http_code}\n' https://mydb-myorg.turso.io/v2/pipeline
Other ways to handle it
If the database is gone and you only need local work, switch to a file: URL. To recreate from what still exists, turso db create mydb --from-db <other-db> copies an existing database, or re-apply your schema with turso db shell mydb < schema.sql.
Reprodúcelo de forma segura
Reproducing this honestly needs a real Turso URL: point @libsql/client at `libsql://definitely-not-a-real-db-example.turso.io` and you get SERVER_ERROR with status 404, since nothing lives at that host. You can also create a database, note the URL, destroy it with `turso db destroy <name>`, and reuse the old URL. `turso dev` always answers, so it cannot reproduce a 404.
Preguntas
My libsql URL looks correct but I still get 404. What now?
URLs are <db>-<org>.turso.io, so a wrong org slug produces a valid-looking host with nothing behind it. Compare the URL character by character with turso db show mydb --url, then check turso db list in the organization you think the database lives in.
Can I test a Turso database URL from the command line?
Yes: curl -s -o /dev/null -w '%{http_code}\n' https://mydb-myorg.turso.io/v2/pipeline returns 404 for a dead host and another status (usually 401) when the host exists but wants a token.
Does turso dev ever return 404?
No. The local dev server always answers for its own database, so a 404 means you are pointing at the cloud, not at turso dev.
Errores relacionados
401 Unauthorized401 Unauthorized: bad or missing auth token403 Forbidden403 Forbidden: no permission for this resourceconnection reset / interruptedConnection reset or dropped
More remote server and hrana errors errors
429 Too Many Requestsrequest rate limit hittoo many connectionsToo many connections to one databaseTransaction timed-outinteractive transaction abortedError in remote responseError in remote response500 Internal Server Errorserver failed on a valid request402 Payment Required402 Payment Required409 Conflict409 Conflictdatabase not foundturso CLI: database not found
El código y el texto del mensaje son de libSQL / Turso documentation. Explora la lista completa de libSQL error list o buscar cada error de base de datos.
Work on libSQL in SQLly
A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for libSQL and the other databases you use.
Texto y datos de esta página: CC BY 4.0, con atribución a SQLly (sqlly.app). Código y fragmentos SQL: MIT. Detalles de la licencia El texto citado de los mensajes de error pertenece a su proveedor de base de datos.