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

Validate non empty zone ID when doing wrangler publish --release #170

Closed
kristianfreeman opened this issue May 28, 2019 · 3 comments · Fixed by #192
Closed

Validate non empty zone ID when doing wrangler publish --release #170

kristianfreeman opened this issue May 28, 2019 · 3 comments · Fixed by #192
Labels
bug Something isn't working

Comments

@kristianfreeman
Copy link
Contributor

kristianfreeman commented May 28, 2019

If a user tries to run wrangler publish --release without a zone ID, they get a fairly opaque message back – we should validate that the zone ID is set before hitting the API at all

Error: ErrorMessage { msg: "⛔ There was an error featching your project\'s routes.\n Status Code: 400 Bad Request\n Msg: {"success\":false,\"errors\":[{\"code\":7003,\"message\":\"Could not route to \\/zones\\/workers\\/routes, perhaps your object identifier is invalid?\"},{\"code\":7000,\"message\":\"No route for that URI\"}],\"messages\":[],\"result\":null}" }
@xtuc
Copy link
Member

xtuc commented May 28, 2019

the zone_id is optional in the config. Not sure what the logic there, cc'ing @ashleygwilliams

@xtuc
Copy link
Member

xtuc commented May 29, 2019

Can you still reproduce it on master?

@ashleygwilliams
Copy link
Contributor

@xtuc if you don't do --release wrangler defaults to deploying to a workers.dev subdomain- which does not need a zone_id. the bug here is that wrangler does check if zone_id exists.. but zone_id is an empty string which is Some(). we need to check is_empty() not is some().

@ashleygwilliams ashleygwilliams changed the title Validate presence of zone ID when doing wrangler publish --release Validate non empty zone ID when doing wrangler publish --release May 31, 2019
@ashleygwilliams ashleygwilliams added bug Something isn't working PR welcome labels May 31, 2019
@xtuc xtuc closed this as completed in #192 Jun 1, 2019
@cloudflare cloudflare deleted a comment Jul 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants