mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-29 01:41:22 +00:00
The route previously fell back to "x-api-key": process.env.EXA_API_KEY ?? "", so a missing env var produced an outbound call to Exa with an empty key. Exa returned an auth failure, which was then surfaced to the client as a generic 500 "Failed to fetch content from Exa API" — making missing configuration indistinguishable from upstream errors and slowing self-hosted setup. Read EXA_API_KEY once at the top of the handler, log a specific message when it's absent, and return a 500 with a clear "service is not configured" error. The downstream fetch now uses the validated, non-empty key directly. |
||
|---|---|---|
| .. | ||
| app | ||
| components | ||
| hooks | ||
| lib | ||
| public | ||
| stores | ||
| .env.example | ||
| .gitignore | ||
| biome.json | ||
| components.json | ||
| globals.css | ||
| instrumentation-client.ts | ||
| middleware.ts | ||
| next.config.ts | ||
| open-next.config.ts | ||
| package.json | ||
| postcss.config.mjs | ||
| README.md | ||
| tsconfig.json | ||
| wrangler.jsonc | ||