Workers SDK Issue Reports

← Back to Dashboard

#9045 "You need a workers.dev subdomain in order to proceed"

Recommendation:NEEDS VERIFICATION
Difficulty:n/a
Reasoning:

Error handling improved in codebase (direct URL to onboarding page, interactive prompts). User version 4.13.0 → 4.60.0 (47 versions behind). No evidence specific `wrangler init` flow tested.

Suggested Action:

Ask reporter to verify both issues (error clarity + retry losing answers) with latest wrangler version.

Analysis Report

Issue Review: cloudflare/workers-sdk#9045

Summary

Error message for missing workers.dev subdomain is confusing and doesn't provide a direct URL; retry after error loses all previous setup answers.

Findings

  • Created: 2025-04-24
  • Updated: 2025-06-09
  • Version: wrangler 4.13.0 → 4.60.0 (current)
  • Component: wrangler (init/deploy)
  • Labels: bug, error-messaging
  • Comments: 0

Key Evidence

  • Error handling already improved in codebase: packages/wrangler/src/routes.ts and packages/wrangler/src/dev/remote.ts contain proper handling for error code 10063:

    • Provides direct URL: https://dash.cloudflare.com/${accountId}/workers/onboarding
    • Offers interactive subdomain registration prompt
    • Clear error messages with actionable solutions
  • PR #568 ("Add a nicer error when there's no workers.dev subdomain") merged 2022-03-11 added initial improved error handling

  • PR #2016 ("Offer to create a workers.dev subdomain on wrangler publish if necessary") merged 2022-10-14 added interactive registration flow

  • Current code in routes.ts shows:

    // When error 10007 (subdomain not found):
    "Would you like to register a workers.dev subdomain now?"
    // If declined:
    `You can either deploy your worker to one or more routes by specifying them in your ${configFileName(configPath)} file, or register a workers.dev subdomain here:
    https://dash.cloudflare.com/${accountId}/workers/onboarding`
    
  • Issue may be context-specific: The user used wrangler init with the Hello World template, which has a different flow than wrangler deploy. The error may still appear with less helpful messaging in the init flow.

  • Second complaint still potentially valid: User mentioned that after the error, they had to "initialize the project from scratch again" - losing all previous answers. This retry/recovery behavior may not have been addressed.

Recommendation

Status: NEEDS VERIFICATION

Reasoning: The codebase shows improved error handling for the workers.dev subdomain scenario, including direct URLs and interactive prompts. However, it's unclear if these improvements apply to the specific wrangler init flow the user experienced. The user's version (4.13.0) is significantly older than current (4.60.0), so the issue may be resolved. The "retry losing answers" concern may still be valid.

Action: Ask the reporter to test with the latest wrangler version and verify if both issues (confusing error + losing answers on retry) are still present.

Suggested Comment

Hi @kornelski, thank you for this detailed feedback on the error messaging UX.

We've made improvements to error handling for the workers.dev subdomain scenario in recent versions of wrangler. The current version (4.60.0) should provide a direct URL to the dashboard onboarding page and offer interactive subdomain registration in most flows.

Since you reported this on version 4.13.0, could you please test with the latest version (npm install -g wrangler@latest) and let us know if:

  1. The error message is now clearer with a direct URL
  2. The retry behavior still loses your previous setup answers

If either issue persists, please let us know which specific command flow you're using so we can investigate further. Thanks!

Notes & Feedback (0)

No notes yet.

Add Note