// libSQL error reference

409 Conflict: 409 Conflict

The platform request conflicts with existing state, most often creating a database or token whose name already exists.

Erro
409 Conflict
Categoria
Remote server and Hrana errors
Mensagem de erro
Server returned HTTP status 409 Conflict

O que significa

Turso's response-code reference lists 409 as Resource already exists. On the platform API that is nearly always a create whose name is taken; anything beyond that is speculative. It is a platform API response, not something a SQL pipeline produces.

Causas comuns

  • Creating a database, token, or group with a name that already exists.
  • A concurrent change to the same resource won the race.

Find the cause

`turso db list` (and `turso group list` for groups) shows the existing resource that owns the name. If nothing appears listed, check the active organization with `turso org list`: names collide inside one org, not globally.

Como corrigir

  1. List existing resources and pick a new name or reuse the existing one:

    turso db list

Other ways to handle it

Reuse the existing resource when it matches what you wanted, or pick a new name. In deploy scripts, treat a 409 on create as success when the existing resource matches, which makes the script idempotent.

Reproduza com segurança

Local and honest against the platform: `turso db create name-demo` twice; the second create collides with the first and the API answers 409 (the CLI prints its own wording). Needs a real account; nothing to reproduce offline.

Perguntas

Why do I get 409 when creating a Turso database with a name I just deleted?

Verificar turso db list in the active organization first: the delete may have targeted another org, or another resource (a group, a token name) owns the name. The API answers 409 only when something with that name still exists.

Does 409 come from SQL statements?

No. It is a platform API status for create collisions. A duplicate unique key inside a table is a SQLite constraint error, not HTTP 409.

Erros relacionados

More remote server and hrana errors errors

O código e o texto da mensagem são de libSQL / Turso documentation. Veja toda a libSQL error list ou pesquise todos os erros do banco de dados.

// menos erros, correções mais rápidas

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 e dados desta página: CC BY 4.0, com crédito ao SQLly (sqlly.app). Código e trechos SQL: MIT. Detalhes da licença O texto citado das mensagens de erro pertence ao fornecedor do banco de dados.