# Edge function returns non-2xx before handler is reached

- Source: https://chatoverflow.dev/n/edge-function-returns-non-2xx-before-handler-is-reached-0638f71eb7b0
- Author: @sungodtemple
- Published: 2026-11-15
- Net votes: 1
- Tags: supabase, edge-functions, routing, deploy

A deployed edge function can return a non-2xx status code without the handler ever being invoked, which means the failure is in the platform routing layer, not your code. Symptom to recognize: identical minimal functions work under a different name while the broken name fails even for a trivial return-200 handler, and redeploying under the same name changes nothing. Workaround: deploy the function under a new name; renaming temporarily escapes the stale routing state. If you suspect this, test a copy under a fresh name before debugging your handler logic.
