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:
- From a server, a terminal or Postman: status 404 and the body
{"code":"NOT_FOUND","message":"Requested function was not found"}. - From a browser, on Supabase's servers: Supabase's 404 article warns that browsers report this 404 as a CORS error, so supabase-js can only say "Failed to send a request to the Edge Function". Before the real call, the browser sends a check request (the preflight) to the same address, and an address with no function behind it fails that check. In our test, where the preflight hit the 404 the same way, the app got
FunctionsFetchErrorwithTypeError: Failed to fetchinerror.context, and Chrome's console showed:
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.
- From a browser, on your computer with
supabase start: the local gateway answers the preflight itself, so the 404 gets through. In our test,functions.invoke()returnedFunctionsHttpError: Edge Function returned a non-2xx status code, with status 404 and the plain-text bodyFunction not foundinerror.context.
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 '{}'
- 404 with
NOT_FOUNDin the body: Supabase doesn't know that name in that project. This guide. - 404 with another body: your function ran and answered 404 itself, often for a record it couldn't find. Search your function for
404. In our test, a function that answered its own{"error":"Order not found"}came back with its own body, readable in the browser too, since that function handled CORS. - Another status: not this 404. See Edge Function returned a non-2xx status code: read the real error and fix it.
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:
Hello-World: capital letters count.hello–world: an en-dash instead of a hyphen, often pasted from a document or a chat. It travels ashello%E2%80%93world, so a%code in the failing address is the giveaway.hello_world: an underscore instead of a hyphen.send-email: a name that was never created.
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?
- Another status, such as 401 or 500: Edge Function returned a non-2xx status code: read the real error and fix it.
- A CORS error, and the terminal call above doesn't return 404: Supabase Edge Function "blocked by CORS policy": every message, fixed.
- 503 with
BOOT_ERROR: Edge Function 503 BOOT_ERROR "Function failed to start (please check logs)".
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.