Skip to content

Improve Hyperdrive error messages for missing required options#14228

Merged
dario-piotrowicz merged 3 commits into
mainfrom
dario/improve-d1-error-messages-for-req-options
Jun 13, 2026
Merged

Improve Hyperdrive error messages for missing required options#14228
dario-piotrowicz merged 3 commits into
mainfrom
dario/improve-d1-error-messages-for-req-options

Conversation

@dario-piotrowicz

Copy link
Copy Markdown
Member

This PR simply improves some hyperdrive error messages to make them more clear and actionable.


  • 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: improving error messages

A picture of a cute animal (not mandatory, but encouraged)

@changeset-bot

changeset-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e928ea8

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

This PR includes changesets to release 4 packages
Name Type
wrangler Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch
@cloudflare/wrangler-bundler Patch

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

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

✅ All changesets look good

@ask-bonk

ask-bonk Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

All the option names referenced in the error messages match the actual yargs option definitions (--origin-scheme, --database, --origin-user, --origin-password, --origin-host, --origin-port, --access-client-id, --access-client-secret).

I notice one subtle point: the --origin-scheme has a default: defaultOriginScheme (line 81). This means args.originScheme would only be falsy if defaultOriginScheme is falsy. But this is unchanged behavior from before — the error message logic is identical, just the wording changed.

Let me confirm the changeset frontmatter is correctly formatted and double-check there's nothing relating to D1 (the branch name mentions D1 but the PR is about Hyperdrive).

The branch is named dario/improve-d1-error-messages-for-req-options but the PR is entirely about Hyperdrive. That's just a branch naming mismatch, not a code issue.

Let me verify the changeset content claims about --origin-scheme suggesting --connection-string — the message at line 243 does include that. All consistent.

The changes are straightforward error-message wording improvements with matching test snapshot updates. Option names are accurate, supported scheme values match the choices, logic flow is unchanged, and telemetry messages are preserved. No logic bugs, security issues, or backward-compat concerns.

LGTM

github run

@pkg-pr-new

pkg-pr-new Bot commented Jun 8, 2026

Copy link
Copy Markdown
create-cloudflare

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

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@14228

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@14228

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

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

wrangler

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

commit: e928ea8

@dario-piotrowicz dario-piotrowicz marked this pull request as ready for review June 8, 2026 22:28
@workers-devprod workers-devprod requested review from a team and ascorbic and removed request for a team June 8, 2026 22:28
@workers-devprod

workers-devprod commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

devin-ai-integration[bot]

This comment was marked as resolved.

@petebacondarwin petebacondarwin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I agree with Devin but otherwise LGTM

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Jun 12, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

@dario-piotrowicz

Copy link
Copy Markdown
Member Author

@petebacondarwin would you mind having a quick look on the last two commits I've pushed here? 🙂🙏

(247b64e and e928ea8)

@dario-piotrowicz dario-piotrowicz merged commit 3578919 into main Jun 13, 2026
62 of 63 checks passed
@dario-piotrowicz dario-piotrowicz deleted the dario/improve-d1-error-messages-for-req-options branch June 13, 2026 15:51
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Jun 13, 2026
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.

3 participants