// 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.

Ошибка
409 Conflict
Категория
Remote server and Hrana errors
Сообщение об ошибке
Server returned HTTP status 409 Conflict

Что это значит

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.

Распространённые причины

  • 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.

Как исправить

  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.

Безопасное воспроизведение

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.

Вопросы

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

Проверить 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.

Связанные ошибки

More remote server and hrana errors errors

Код и текст сообщения взяты из libSQL / Turso documentation. Смотрите весь libSQL error list или поиск по всем ошибкам баз данных.

// меньше ошибок, быстрее исправления

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.

Текст и данные на этой странице: CC BY 4.0, с указанием SQLly (sqlly.app). Код и фрагменты SQL: MIT. Подробнее о лицензии Цитируемый текст сообщений об ошибках принадлежит производителю СУБД.