Error: proxy request failed, cannot connect to the specified address

I'm getting this error on my production build on Cloudflare Workers.

Here is the source code https://github.com/safecircleia/waitlist all enviroment variables are setup correctly and it works locally

{
  "source": {
    "level": "error",
    "message": "# SERVER_ERROR:  Error: proxy request failed, cannot connect to the specified address",
    "$cloudflare": {
      "$metadata": {
        "id": "01JVA5N0GT3X8G538VFFW74Z08",
        "type": "cf-worker",
        "error": "# SERVER_ERROR:  Error: proxy request failed, cannot connect to the specified address"
      }
    }
  },
  "dataset": "cloudflare-workers",
  "timestamp": "2025-05-15T14:30:23.514Z",
  "$workers": {
    "truncated": false,
    "event": {
      "request": {
        "url": "https://app.safecircle.tech/api/auth/sign-in/email",
        "method": "POST",
        "path": "/api/auth/sign-in/email"
      }
    },
    "outcome": "ok",
    "scriptName": "safecircle-waitlist",
    "eventType": "fetch",
    "executionModel": "stateless",
    "scriptVersion": {
      "id": "981400c9-b4be-4c32-9de0-78df40d72017"
    },
    "requestId": "9403553cadf9026b"
  },
  "$metadata": {
    "id": "01JVA5N0GT3X8G538VFFW74Z08",
    "requestId": "9403553cadf9026b",
    "trigger": "POST /api/auth/sign-in/email",
    "service": "safecircle-waitlist",
    "level": "error",
    "error": "# SERVER_ERROR:  Error: proxy request failed, cannot connect to the specified address",
    "message": "# SERVER_ERROR:  Error: proxy request failed, cannot connect to the specified address",
    "account": "537639845b3a2365ae57881fbcbd6eee",
    "type": "cf-worker",
    "fingerprint": "adf6643df0abd1a3726de506411bd13b",
    "origin": "fetch"
  },
  "links": []
}
Solution
Ok, I just needed to add enviroments variable in the runtime options not just in the build configuration
Was this page helpful?