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

Đang mở
#558 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

@Dx-Alz-xD đang làm issue này rồi.

Từ ngày 11/11/2026.

  • #565 của @Dx-Alz-xD — đang mở

Đá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
Lĩnh vực
api, backend, devops

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

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

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CodeChefVIT/papers-codechef

Tất cả issue của CodeChefVIT/papers-codechef

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.