libSQL error codes
libSQL is a fork of SQLite, so errors on a local file are the same SQLite result codes. Remote databases (Turso Cloud or a self-hosted sqld) talk the Hrana protocol over HTTP, so failures arrive as HTTP status codes and server error messages instead. Both shapes are listed here.
Reading a libSQL error
On a local file or embedded replica, libSQL reuses SQLite result codes, so you see things like SQLITE_BUSY: database is locked. Look those up in the SQLite catalog too.
Against a remote server, the client reports SERVER_ERROR: Server returned HTTP status ... and the body carries the server's own message. The HTTP status is often the most reliable part.
Turso Cloud adds platform errors on top: expired auth tokens (401), permission limits (403), missing databases (404), and request-rate limits (429).
The Turso CLI (turso db tokens create, turso db show) reports its own errors when a name or organization does not exist.
All libSQL errors in this reference
19 codes, 18 with a full write-up (linked). Codes and messages are from the libSQL / Turso documentation.
Local SQLite errors
| 코드 | 의미 |
|---|---|
SQLITE_BUSY
|
SQLITE_BUSY: the database is busy
5
SQLITE_BUSY
|
SQLITE_AUTH
|
SQLITE_AUTH: 권한 거부됨
23
권한 거부
|
Remote server and Hrana errors
| 코드 | 의미 |
|---|---|
404 Not Found
|
404 Not Found: unknown database or endpoint Server returned HTTP status 404 Not Found |
429 Too Many Requests
|
request rate limit hit Server returned HTTP status 429 Too Many Requests |
connection reset / interrupted
|
Connection reset or dropped The connection was interrupted while communicating with the server |
too many connections
|
Too many connections to one database Too many connections to the database |
Transaction timed-out
|
interactive transaction aborted interactive transaction not allowed in HTTP queries |
Error in remote response
|
Error in remote response Error in remote response |
500 Internal Server Error
|
server failed on a valid request Server returned HTTP status 500 Internal Server Error |
402 Payment Required
|
402 Payment Required Server returned HTTP status 402 Payment Required |
409 Conflict
|
409 Conflict Server returned HTTP status 409 Conflict |
database not found
|
turso CLI: database not found database not found: <name> |
socket closed unexpectedly
|
Hrana socket closed the socket connection was closed unexpectedly |
Authentication and tokens
| 코드 | 의미 |
|---|---|
401 Unauthorized
|
401 Unauthorized: bad or missing auth token Server returned HTTP status 401 Unauthorized |
403 Forbidden
|
403 Forbidden: no permission for this resource Server returned HTTP status 403 Forbidden |
auth token expired
|
Auth token expired 401 Unauthorized: auth token is invalid or expired |
no organization
|
turso CLI: no organization no organization selected or available |
Replicas and consistency
| 코드 | 의미 |
|---|---|
SQLITE_BUSY: database is locked
|
embedded replica file locked
5
SQLITE_BUSY: 데이터베이스가 잠겨 있습니다
|
replica out of date
|
stale reads from a failing replica replica out of date with the primary |
A faster way to work with libSQL
SQLly는 macOS, Windows, Linux용 네이티브 SQL 클라이언트로, 스키마 인식 IntelliSense와 위험한 명령문에 대한 안전장치를 갖추고 있습니다.
이 페이지의 텍스트와 데이터: CC BY 4.0, 출처: SQLly (sqlly.app). 코드와 SQL 스니펫: MIT. 라이선스 세부 정보 인용된 오류 메시지 텍스트의 권리는 해당 데이터베이스 공급업체에 있습니다.