Local dev: upload, request and subscribe return 500 when Upstash isn't configured

Aperta
#558 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@Dx-Alz-xD ci sta già lavorando.

Dal 11/11/2026.

  • #565 di @Dx-Alz-xD — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
next.js, redis, typescript
Ambito
api, backend, devops

Direzione di ricerca

Start with src/lib/utils/redis.ts and the middleware rate limiters; check how missing Upstash environment variables affect /api/upload, /api/request, and /api/subscribe. Compare the two options in the issue: require the variables in src/env.js or skip rate limiting in development. Done means these requests no longer return an unexplained 500 when the variables are absent; pull request #565 is already open.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug
If UPSTASH_REDIS_REST_URL / UPSTASH_REDIS_REST_TOKEN arent set, redis becomes an empty object cast to Redis

https://github.com/CodeChefVIT/papers-codechef/blob/6e3aa1152a34c7eb46d36f58294dffd9ff3b3c7b/src/lib/utils/redis.ts#L9

The rate limiters in the middleware then call methods that dont exist
so every request to /api/upload /api/request and /api/subscribe fails with a 500 whose error doesnt mention Upstash

To Reproduce

  1. Start the app with pnpm dev without the Upstash variables
  2. Submit a paper request or subscribe from the footer -> 500

Expected behavior
either fail at startup with a message saying the Upstash variables are required (eg: add them to the env schema in src/env.js), or skip rate limiting in development when they're missing

Lingua principale
TypeScript
Stelle
22
Fork
66
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CodeChefVIT/papers-codechef

Tutte le issue di CodeChefVIT/papers-codechef

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.