mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
<!-- ccr-slack-attribution --> _Requested by **Kalleby Santos** · [Slack thread](https://supabase.slack.com/archives/C02KMRX22NR/p1785949561216739?thread_ts=1785949561.216739&cid=C02KMRX22NR)_ ## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Docs update. Adds two missing entries to the Edge Functions **Error codes** page (`apps/docs/content/guides/functions/error-codes.mdx`). Refs https://github.com/supabase/supabase/issues/47739 ## What is the current behavior? Neither `NOT_FOUND_FUNCTION_BLOB` nor `LOAD_FUNCTION_UNBUNDLING_ERROR` appears on the Error codes page. Someone who gets a 404 with `sb-error-code: NOT_FOUND_FUNCTION_BLOB` and searches the page finds nothing — and because the response body is the same `Requested function was not found` string that generic `NOT_FOUND` returns, the existing `NOT_FOUND` entry reads like it covers the case when it doesn't. ## What is the new behavior? Both codes are documented under `## Server Errors` with a cause and a remedy, in the page's existing `**Cause:**` / `**Solution:**` shape. - `NOT_FOUND_FUNCTION_BLOB` goes directly after `### NOT_FOUND`, since readers hitting it will scan for `NOT_FOUND` first. The cause explains the metadata/bundle version mismatch (concurrent or batched deploys double-incrementing the metadata version), notes that the message is identical to `NOT_FOUND` so the `sb-error-code` header is the distinguisher, and links the existing [Edge Function 404 error response](https://supabase.com/docs/guides/troubleshooting/edge-function-404-error-response) troubleshooting guide. Solution: redeploy with the latest CLI, avoid concurrent deploys of the same function, contact support to re-sync metadata if it persists. - `LOAD_FUNCTION_UNBUNDLING_ERROR` goes at the end, keeping the `LOAD_FUNCTION_*` cluster together. Cause: the bundle was fetched but decompression/parsing failed, which points at a corrupt or partially-written bundle. Solution: redeploy, contact support if it persists. ## Additional context Both codes are real and currently emitted by `supabase/edge-functions-ingress` (`main`): - `NOT_FOUND_FUNCTION_BLOB` — 404, declared at `src/main/errors.ts:29`, emitted at `src/main/cache.ts:180` - `LOAD_FUNCTION_UNBUNDLING_ERROR` — 503, declared at `src/main/errors.ts:27`, emitted at `src/main/cache.ts:226` Both were introduced by supabase/edge-functions-ingress#464. ### Notes for reviewer - **Scope.** The comment on #47739 asked only for `NOT_FOUND_FUNCTION_BLOB`. `LOAD_FUNCTION_UNBUNDLING_ERROR` is included because it shipped in the same ingress PR and is equally undocumented — happy to drop it if you'd rather keep this PR to exactly what was requested. - **No HTTP statuses in the copy.** The 404/503 above are deliberately left out of the page text, because the Error codes page states no HTTP status anywhere for any code. Adding them here would be a format departure. Easy to add if you'd prefer to start including them. - **Message mismatch, not fixed here.** `apps/docs/content/troubleshooting/edge-function-404-error-response.mdx` declares `message = "Function deployment bundle not found"` for `NOT_FOUND_FUNCTION_BLOB`, but the runtime actually emits `"Requested function was not found"` (`cache.ts:181`), which matches the response pasted in #47739. Left untouched in this PR — flagging it for a follow-up. ### Checks run - `prettier --check` on the changed file: passes. - `supa-mdx-lint` (v0.3.2) on the changed file: no new findings. The one remaining warning (`error-codes.mdx:11` — "Use 'view and resolve errors' instead of 'handle errors'") is pre-existing on `master` and untouched here. - The `{/* supa-mdx-lint-disable Rule001HeadingCase */}` pragma at line 8 sits above both new H3s, so the uppercase headings pass. --- _Generated by [Claude Code](https://claude.ai/code/session_01Qw5D2wdScBN5TWuA2FgnDW)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
Reference Docs
Supabase Reference Docs
Maintainers
If you are a maintainer of any tools in the Supabase ecosystem, you can use this site to provide documentation for the tools & libraries that you maintain.
DocSpec
We use documentation specifications which can be used to generate human-readable docs.
- OpenAPI: for documenting API endpoints.
- SDKSpec (custom to Supabase): for SDKs and client libraries.
- ConfigSpec (custom to Supabase): for configuration options.
- CLISpec (custom to Supabase): for CLI commands and usage.
The benefit of using custom specifications is that we can generate many other types from a strict schema (eg, HTML and manpages). It also means that we can switch to any documentation system we want. On this site we use Next.js, but on Supabase's official website, we use a custom React site and expose only a subset of the available API for each tool.
Contributing
To contribute to docs, see the developers' guide and contributing guide.