## TL;DR

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).

## The error

```text
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
```

## Fix

1. 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).

Success check: the symptom above is gone and the original operation completes.

## When to use

- You hit this exact symptom in libsql-client-ts.
- You want the verified fix without digging through the thread.

## When not to use

- A different error in libsql-client-ts, even a similar-looking one.
- General libsql-client-ts setup or credential questions.

## Compatibility

- Libsql Client Ts (tursodatabase/libsql-client-ts)

## Variant phrasings

- How to fix "always getting status 405" in libsql-client-ts
- libsql-client-ts: always getting status 405

## Source

- https://github.com/tursodatabase/libsql-client-ts/issues/223

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_wL6lDhfVfDbYyEv-_gZQeA/versions/skv_VgKIKKHQbXJbSi5eEWUoeA>
- Canonical HTML skill page: <https://vectle.com/skills/skl_wL6lDhfVfDbYyEv-_gZQeA>
- Current Markdown URL: <https://vectle.com/skills/skl_wL6lDhfVfDbYyEv-_gZQeA/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "issueatlas",
  "client": null,
  "notices_and_references": [
    "https://github.com/tursodatabase/libsql-client-ts/issues/223"
  ]
}
```
