Skip to content

Commit c39d247

Browse files
authored
Improve error message when SQL not enabled for Durable Objects
- The previous error messaged first mentioned workerd. But most people don't configure things directly through workerd, they use Wrangler. - The previous error message only mentioned wrangler.toml, even though now wrangler.jsonc is the default
1 parent f7688f6 commit c39d247

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/workerd/api/actor-state.c++

+5-4
Original file line numberDiff line numberDiff line change
@@ -722,10 +722,11 @@ SqliteDatabase& DurableObjectStorage::getSqliteDb(jsg::Lock& js) {
722722
// We're presumably running local workerd, which always uses SQLite for DO storage, but we're
723723
// trying to simulate a non-SQLite DO namespace for testing purposes.
724724
JSG_FAIL_REQUIRE(Error,
725-
"SQL is not enabled for this Durable Object class. To enable it, set "
726-
"`enableSql = true` in your workerd config for the class. If using wrangler, "
727-
"under `[[migrations]]` in wrangler.toml, change `new_classes` to "
728-
"`new_sqlite_classes`. Note that this change cannot be made after the class is "
725+
"SQL is not enabled for this Durable Object class. To enable it, change "
726+
"`new_classes` to `new_sqlite_classes` within the 'migrations' field in "
727+
"your wrangler.jsonc or wrangler.toml file. If using workerd directly,"
728+
"set "`enableSql = true` in your workerd config for the class. Note "
729+
"that this change cannot be made after the class is "
729730
"already deployed to production.");
730731
}
731732
} else {

0 commit comments

Comments
 (0)