Error: D1_ERROR: Error: not authorized
This works in local dev, and my other CRUD routes work without issue, however the following code throws error
Error: D1_ERROR: Error: not authorized
in production.
Anybody have any ideas? Is something not supported in D1 like returning()
or transactions or something? I'm using Miniflare in dev and it works here.
2 Replies
FYI, same problem for me. Did you figure it out?
Ah, transactions aren't supported by D1 yet! See https://github.com/drizzle-team/drizzle-orm/issues/758 and https://github.com/drizzle-team/drizzle-orm/pull/761
GitHub
[BUG]: Transactions don't work with D1 · Issue #758 · drizzle-team/...
What version of drizzle-orm are you using? 0.26.5 What version of drizzle-kit are you using? 0.18.1 Describe the Bug It looks like D1 doesn't support standard transactions. begin immediate retu...
GitHub
[sqlite] Implement
runInBatch
for d1 by tjenkinson · Pull Request...see #758
Happy to prepare a PR on the docs site to update those too if the approach here is ok.
Initially I wanted to just add it to D1, but that would mean having to do an instanceof D1PreparedSta...