Bug: Improperly formed route causes TypeError in frontend

Hi, I have a bug to report for the Workers dashboard. Creating an improperly formed route causes a JavaScript error when opening the “Triggers” tab, which sends the page to the crash feedback page.

Steps to reproduce:

  • Using a new or existing worker, navigate to the Triggers tab and create a new route that starts with a * and is part of the subdomain name. Example: *foo.example.com/*
  • After creating a new route, you’ll see “It looks like we’re having to internal issues.” On the console, you see SomethingWrong: TypeError: URL constructor: https://*foo.example.com/* is not a valid URL.
  • Refresh the page and navigate to the Triggers tab again for that worker. The page will crash immediately. It will continue crashing until the route is removed through the Cloudflare API.

Thankfully, it’s easy to remove the bad route with Wrangler, but it’s probably worth fixing in the frontend. Just something to report. Thanks.