Local dev: upload, request and subscribe return 500 when Upstash isn't configured
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- next.js, redis, typescript
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 22
- Fork
- 66
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CodeChefVIT/papers-codechef
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
CodeChefVIT/papers-codechef#552 ·
-
/api/upcoming-papers Throws 404 When No Exams are ActiveCó thể đã có người làm @Dx-Alz-xD đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CodeChefVIT/papers-codechef#549 · 1 reaction ·
-
Hardcoded "BMAT102L" Default Course CodeCó thể đã có người làm @Dx-Alz-xD đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CodeChefVIT/papers-codechef#548 ·
-
Search Bar NaN Sorting & Console Log SpamCó thể đã có người làm @Dx-Alz-xD đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
CodeChefVIT/papers-codechef#547 ·
-
Pinned subjects: a bad localStorage value crashes the pageCó thể đã có người làm @Dx-Alz-xD đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
CodeChefVIT/papers-codechef#559 ·
Tất cả issue của CodeChefVIT/papers-codechef
Issue tương tự
-
Language request: NixĐang mởenhancement language
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
pngwn/twinkleplop#178 ·
-
Type: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
resend/react-email#3889 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
build P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
maniator/verticopolis#1945 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Admin users page number stays stale after filteringCó thể đã có người làm @matthewxkong đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
feature request needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100