App Finishers

Fix guide · updated 2026-11-17

Edge Function 404 "Requested function was not found" (NOT_FOUND)

{"code":"NOT_FOUND","message":"Requested function was not found"}

Your app calls a Supabase Edge Function and gets status 404 with "Requested function was not found", code NOT_FOUND. Or, in the browser, you only see a CORS error and "Failed to send a request to the Edge Function". Either way, Supabase doesn't know a function by that name in that project: the name in your app doesn't match the deployed one, the function was never deployed, or your app points at another project. The local server, supabase functions serve, answers "Function not found" for the same thing. We reproduced it with the Supabase CLI's local function server on Supabase's edge-runtime 1.79.1, Chromium 145 and supabase-js 2.119, November 2026.

What your app sees

It depends on where the call comes from:

Access to fetch at '…/functions/v1/send-email' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

So the same wrong name can show up as a clear 404 on your computer and as a CORS error once deployed.

Make sure it's this 404

The browser hides this answer, but a terminal doesn't. Call the exact address your app calls (copy it from the failing request in your browser's Network tab), with the anon or publishable key your app uses, sent the way supabase-js sends it:

curl -i 'https://YOUR_PROJECT_REF.supabase.co/functions/v1/send-email' \
  -H 'apikey: YOUR_KEY' -H 'Authorization: Bearer YOUR_KEY' \
  -H 'Content-Type: application/json' -d '{}'

Your function's own logs stay empty for this 404, since the request never reached it. Supabase's article gives a log query that lists these 404s: a request with an empty execution_id never found a function.

Fix 1: make the name match exactly

The name in functions.invoke('…') has to match the deployed function's name character for character. In our test, each of these got the 404 when the function was hello-world:

To see the exact names, run supabase functions list (the SLUG column is the name that goes in the address) or open Edge Functions in the Supabase dashboard.

Two typos didn't matter in our test: a trailing space (supabase-js builds the address with the standard URL parser, which drops it), and, on the local server, a leading or trailing slash ('/hello-world' or 'hello-world/' still reached the function). Supabase's article still lists extra slashes among the typos behind this 404 on its servers, so remove them.

Fix 2: deploy the function to the project your app uses

A function in your code isn't on Supabase until it's deployed:

supabase functions deploy send-email

Then check that it shows up in supabase functions list. Also check the Supabase address your app uses, such as VITE_SUPABASE_URL or NEXT_PUBLIC_SUPABASE_URL: it must be the project you deployed to. Supabase's docs list this first for a 404: verify the function name and the project reference in the request URL. If you just deployed, give it a few minutes: Supabase's advice for this code is to redeploy and wait until every region has the update.

On your computer, the CLI only serves folders that have an index.ts (unless config.toml names another entrypoint), and it skips a function set to enabled = false in config.toml, printing Skipped serving Function: send-email. In our test, a folder with only an index.js and a function switched off that way both got the same Function not found.

Fix 3: it's listed but still 404s

A second 404, NOT_FOUND_FUNCTION_BLOB, means Supabase knows the name but can't find the deployed code, even when the dashboard shows the function as ACTIVE. Supabase's pages disagree on its message (one shows "Function deployment bundle not found", the other says it's the same "Requested function was not found"), so read the sb-error-code header in the curl -i answer above: it says NOT_FOUND or NOT_FOUND_FUNCTION_BLOB.

Supabase names two causes: two deploys of the same function running at once, such as overlapping GitHub Actions runs, and a batch deploy whose metadata update failed. First, make a test call from the dashboard (open the function, then test it). If it fails too, or the header says NOT_FOUND_FUNCTION_BLOB, deploy the function again with the latest Supabase CLI, and don't let two deploys of the same function overlap. If the 404 stays, Supabase's support can re-sync the function.

If an AI tool built your app

Two mix-ups to look for in generated code: invoke('sendEmail') for a function deployed as send-email, and a function whose code exists but was never deployed. Give your AI tool this prompt, with your function list:

My app calls a Supabase Edge Function and gets 404 NOT_FOUND ("Requested function was not found"), or "Failed to send a request to the Edge Function" with a CORS error in the browser. Here is the output of "supabase functions list": [paste it here]. Find every supabase.functions.invoke() call and every fetch to /functions/v1/ in the code, and make each function name match a SLUG from that list exactly: same letters, same case, plain hyphens, no slashes. If the code needs a function that isn't in the list, tell me which one and give me the command to deploy it. Check that the Supabase URL the app uses is the project from that list. Show me each change before making it.

Not quite your error?

Still stuck?

Paste the failing address from the Network tab and the SLUG from supabase functions list one above the other, and compare them letter by letter, project reference included. Look-alike characters hide easily: a % code in the address means one crept in.

Other Supabase problems? See Supabase fixes.