You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.
When pushing a worker with a different name to a route that already exists, the Cloudflare Workers API returns an error. Wrangler should handle this error gracefully, and not print the raw API response.
Basic example
To reproduce, create a worker named worker, change your route to myzone.com/test run wrangler publish. Then change the name in your toml to worker-test and run wrangler publish again. You should see this:
Error: ⚠️ There was an error creating your route.
Status Code: 409 Conflict
Msg: {
"result": null,
"success": false,
"errors": [
{
"code": 10020,
"message": "workers.api.error.duplicate_route"
}
],
"messages": []
}
It'd be nicer if we had a map of status codes/API messages to more user friendly messages.
The text was updated successfully, but these errors were encountered:
Is the issue to map all status codes/API messages to more user friendly message, or just to handle workers.api.error.duplicate_route for now? If so, here is the trivial fix attempt: #813. Would be happy to change it, or do more, if needed.
hey @saran19 thanks for the update! This issue is closed, and while it looks related, the error you are reporting is actually separate. can you please file a new bug issue with your case?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
💡 Feature request
Overview and problem statement
When pushing a worker with a different name to a route that already exists, the Cloudflare Workers API returns an error. Wrangler should handle this error gracefully, and not print the raw API response.
Basic example
To reproduce, create a worker named
worker
, change your route tomyzone.com/test
runwrangler publish
. Then change the name in your toml toworker-test
and runwrangler publish
again. You should see this:It'd be nicer if we had a map of status codes/API messages to more user friendly messages.
The text was updated successfully, but these errors were encountered: