Local dev: upload, request and subscribe return 500 when Upstash isn't configured
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- next.js, redis, typescript
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
If UPSTASH_REDIS_REST_URL / UPSTASH_REDIS_REST_TOKEN arent set, redis becomes an empty object cast to Redis
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
- Start the app with
pnpm devwithout the Upstash variables - 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
- Lenguaje dominante
- TypeScript
- Estrellas
- 22
- Forks
- 66
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de CodeChefVIT/papers-codechef
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
CodeChefVIT/papers-codechef#552 ·
-
/api/upcoming-papers Throws 404 When No Exams are ActivePosiblemente ocupada @Dx-Alz-xD la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
CodeChefVIT/papers-codechef#549 · 1 reacción ·
-
Hardcoded "BMAT102L" Default Course CodePosiblemente ocupada @Dx-Alz-xD la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
CodeChefVIT/papers-codechef#548 ·
-
Search Bar NaN Sorting & Console Log SpamPosiblemente ocupada @Dx-Alz-xD la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
CodeChefVIT/papers-codechef#547 ·
-
Pinned subjects: a bad localStorage value crashes the pagePosiblemente ocupada @Dx-Alz-xD la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
CodeChefVIT/papers-codechef#559 ·
Todos los issues de CodeChefVIT/papers-codechef
Issues similares
-
Language request: NixAbiertoenhancement language
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
pngwn/twinkleplop#178 ·
-
Type: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
resend/react-email#3889 ·
Los mantenedores suelen responder en 1 día
-
build P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
maniator/verticopolis#1945 ·
Los mantenedores suelen responder en 1 día
-
Admin users page number stays stale after filteringPosiblemente ocupada @matthewxkong la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
feature request needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100