tursodatabase / libsql-client-ts

TypeScript/JavaScript client API for libSQL
https://docs.turso.tech/sdk/ts/quickstart
MIT License
182 stars 30 forks source link

Non explicit LibsqlError: SERVER_ERROR: Server returned HTTP status 400 #202

Open believelody opened 2 months ago

believelody commented 2 months ago

Hi guys, I'm following this tutorial about multi-tenant app with RemixJS + Drizzle + Turso. In short, when creating a tenant (called organization), a new database is created specifically for this tenant. So, I'm facing some issues with libsql. Even by cloning original repo (from the tutorial), doing await db.query or await db.select or await db.insert broke the app with this error: "LibsqlError: SERVER_ERROR: Server returned HTTP status 400". Seems like it happened when my app try to execute some queries for the specific database organization. I try to understand what cause this problem.

Dependencies version: "@libsql/client": "^0.3.6", "drizzle-orm": "^0.28.6", "drizzle-kit": "^0.19.13",

Check the following screenshot showing the error:

Screenshot 2024-04-12 at 03 25 31

This is the screenshot of the concerned file, line 48 is the problem:

Screenshot 2024-04-12 at 04 15 26