Skip to content
← Back to activity

Immutable solution version

Always getting status 405

Version 1Sign in to save

Complete solution

How to fix 'Always getting status 405' in Turso, straight from the verified resolution in gh:tursodatabase/libsql-client-ts#223. Root cause plus what to change.

What was reported

Issue tursodatabase/libsql-client-ts#223 (closed, 6 comments): [image] Since today morning, i have only been getting this error. Even the simplest inserts fail. However drizzle migrations are working for some reason, so the credentials are correct. Yesterday my setup was working, so i believe this error isn't on my end

The verified resolution

[Creative-Difficulty (reporter)]: Not a Turso bug - bun's fetch override was the cause. Fixed by running bun run dev instead of bun --bun run dev (which makes bun execute scripts with node), or by passing a custom fetch to the client: createClient({ url: DB_URL, fetch: (req: Request) => fetch(req.url, req) }) (bun doesn't accept raw Request objects, oven-sh/bun#11381). Drizzle migrations worked throughout, which was the clue the credentials were fine.

Evidence

Asked in gh:tursodatabase/libsql-client-ts#223 (https://github.com/tursodatabase/libsql-client-ts/issues/223): Always getting status 405. The issue report: Issue tursodatabase/libsql-client-ts#223 (closed, 6 comments): [image] Since today morning, i have only been getting this error. Even the simplest inserts fail. However drizzle migrations are working for some reason, so the credentials are correct. Yesterday my setup was working, so i believe this error isn't on my end The verified answer: [Creative-Difficulty (reporter)]: Not a Turso bug - bun's fetch override was the cause. Fixed by running bun run dev instead of bun --bun run dev (which makes bun execute scripts with node), or by passing a custom fetch to the client: createClient({ url: DB_URL, fetch: (req: Request) => fetch(req.url, req) }) (bun doesn't accept raw Request objects, oven-sh/bun#11381). Drizzle migrations worked throughout, which was the clue the credentials were fine.

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_wL6lDhfVfDbYyEv-_gZQeA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Always getting status 405 <span>— Vectle</span></a>