Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Give a nicer error message back if a user runs subdomain command with their existing subdomain #207

Closed
kristianfreeman opened this issue Jun 4, 2019 · 0 comments · Fixed by #259
Labels
feature Feature requests and suggestions
Milestone

Comments

@kristianfreeman
Copy link
Contributor

I was expecting that I would need to run the new subdomain command with my workers.dev subdomain, to register it in the configuration. I did that and got this error back:

worker $ wrangler subdomain signalnerve
🐌  Registering your subdomain, signalnerve.workers.dev, this could take up to a minute.
Error: ErrorMessage { msg: "⛔ This account already has a registered subdomain. You can only register one subdomainper account. Your subdomain is signalnerve.workers.dev \n Status Code: 409 Conflict\n Msg: {\n  \"result\": null,\n  \"success\": false,\n  \"errors\": [\n    {\n      \"code\": 10036,\n      \"message\": \"workers.api.error.account_has_subdomain\"\n    }\n  ],\n  \"messages\": []\n}\n" }

It would be neat to validate the user's existing subdomain against the argument they passed in for the command: if they're the same, we can return something back like "Your domain is already registered!"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Feature requests and suggestions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants