Cannot use api to delete worker deployed by wrangler

Hi Team,

using api from: Cloudflare API Documentation

I could successfully delete the worker uploaded by api. but I cannot delete worker deployed by wrangler.

      "created_on": "2023-06-16T03:47:48.079364Z",
      "modified_on": "2023-06-16T03:47:50.568896Z",
      "id": "xxx",
      "tag": "xxxx",
      "tags": [],
      "deployment_id": "",
      "tail_consumers": null,
      "logpush": false,
      "etag": "xxxx",
      "handlers": [
      "last_deployed_from": "wrangler",
      "compatibility_date": "2023-06-16",
      "usage_model": "bundled",
      "routes": null

when I try to delete a worker xxx like above, the api always respond me with:

  "result": null,
  "success": false,
  "errors": [
      "code": 100109,
      "message": "workers.api.error.script_reference"
  "messages": []

any ideas why?

1 Like