tursodatabase / libsql-client-go

Go client API for libSQL
MIT License
166 stars 23 forks source link

Returned errors don't show SQLite error code #62

Open CodingDoug opened 12 months ago

CodingDoug commented 12 months ago

The other libsql drivers show both the SQLite error code along with the message. This helps developers better understand and diagnose problems. For example, the TypeScript and Python SDKs yield errors that look like this:

SQLITE_CONSTRAINT: SQLite error: cannot store TEXT value in INT column foo.i

Whereas this SDK shows:

SQLite error: cannot store TEXT value in INT column foo.i

Ideally the error object is a struct that provides the code and message separately, but I'm not sure if that's possible as sql/database driver.