Skip to content

[wrangler] Improve D1 database limit error message#12472

Merged
petebacondarwin merged 1 commit intomainfrom
fix/2913-d1-db-limit-message
Feb 9, 2026
Merged

[wrangler] Improve D1 database limit error message#12472
petebacondarwin merged 1 commit intomainfrom
fix/2913-d1-db-limit-message

Conversation

@petebacondarwin
Copy link
Copy Markdown
Contributor

@petebacondarwin petebacondarwin commented Feb 7, 2026

Fixes #2913.

Improves the error message shown when users try to create a D1 database but have reached their account's database limit. The new message matches the user-friendly format used in the Cloudflare Dashboard and provides actionable guidance.

Before (raw API error):

✘ [ERROR] A request to the Cloudflare API (/accounts/.../d1/database) failed.

  System limit reached: databases per account (10) [code: 7406]

After (user-friendly message):

You have reached the maximum number of D1 databases for your account.
Please consider deleting unused databases, or visit the D1 documentation to learn more: https://developers.cloudflare.com/d1/

To list your existing databases, run: wrangler d1 list
To delete a database, run: wrangler d1 delete <database-name>

  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: This is a CLI UX improvement - the error message itself provides all necessary guidance

Open with Devin

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 7, 2026

🦋 Changeset detected

Latest commit: 23a6de1

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Feb 7, 2026

Claude finished @petebacondarwin's task —— View job


Changeset Review

All changesets look good

The changeset .changeset/friendly-d1-limit-error.md passes all validation criteria:

  1. Version Type: patch is correct for a UX improvement to an error message
  2. Changelog Quality: Clear, meaningful description with good context about what changed and why
  3. Markdown Headers: No h1/h2/h3 headers used
  4. Analytics: Not applicable (no analytics changes)
  5. Dependabot: Not applicable (not a dependency update)
  6. Experimental features: Not applicable (stable feature)

The changeset follows the recommended format with a clear title and helpful body that explains both the change and its benefit to users.


@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Feb 7, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@12472

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@12472

miniflare

npm i https://pkg.pr.new/miniflare@12472

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@12472

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@12472

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@12472

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@12472

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@12472

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@12472

wrangler

npm i https://pkg.pr.new/wrangler@12472

commit: 23a6de1

@petebacondarwin petebacondarwin marked this pull request as ready for review February 7, 2026 14:50
@petebacondarwin petebacondarwin requested review from a team as code owners February 7, 2026 14:50
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Feb 7, 2026
When attempting to create a D1 database after reaching the account's
limit, show a more helpful error message with actionable guidance
instead of the raw API error.

The new error message includes:
- A clear explanation that the account limit has been reached
- A link to D1 documentation
- Commands to list and delete databases

Fixes #2913
@petebacondarwin petebacondarwin force-pushed the fix/2913-d1-db-limit-message branch from f642ef3 to 23a6de1 Compare February 8, 2026 14:11
@petebacondarwin petebacondarwin merged commit 62635a0 into main Feb 9, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Feb 9, 2026
@petebacondarwin petebacondarwin deleted the fix/2913-d1-db-limit-message branch February 9, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

🐛 BUG: Make d1 db limit error message match Cloudflare dashboard

3 participants