tursodatabase / libsql-experimental-python

libSQL API for Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve error reporting

avinassh opened this issue · comments

For e.g. I tried to insert a table which already existed. The exception message:

Traceback (most recent call last):
  File "writes_no_sync.py", line 9, in <module>
    connection.execute(
ValueError: Write delegation: `status: PermissionDenied, message: "table my_vec_table already exists in \n               CREATE TABLE my_vec_table\n               (\n                 rowid INTEGER PRIMARY KEY AUTOINCREMENT,\n                 text TEXT,\n                 metadata BLOB,\n                 text_embedding BLOB\n               )\n               ;\n                at offset 29", details: [], metadata: MetadataMap { headers: {"access-control-allow-credentials": "true", "access-control-allow-origin": "*", "access-control-expose-headers": "grpc-status,grpc-message,grpc-status-details-bin", "content-type": "application/grpc-web+proto", "date": "Fri, 01 Dec 2023 12:59:03 GMT", "fly-request-id": "01HGJQC4C1408F563EMKNNMR37-maa", "via": "2 fly.io, 1.1 fly.io", "content-length": "0", "server": "Fly/025f89f7 (2023-11-27)", "vary": "origin", "vary": "access-control-request-method", "vary": "access-control-request-headers"} }`