Local dev: upload, request and subscribe return 500 when Upstash isn't configured
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- next.js, redis, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- TypeScript
- スター
- 22
- フォーク
- 66
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CodeChefVIT/papers-codechef のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
CodeChefVIT/papers-codechef#552 ·
-
/api/upcoming-papers Throws 404 When No Exams are Active対応中かも @Dx-Alz-xD が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CodeChefVIT/papers-codechef#549 · リアクション 1 件 ·
-
Hardcoded "BMAT102L" Default Course Code対応中かも @Dx-Alz-xD が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CodeChefVIT/papers-codechef#548 ·
-
Search Bar NaN Sorting & Console Log Spam対応中かも @Dx-Alz-xD が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
CodeChefVIT/papers-codechef#547 ·
-
Pinned subjects: a bad localStorage value crashes the page対応中かも @Dx-Alz-xD が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
CodeChefVIT/papers-codechef#559 ·
CodeChefVIT/papers-codechef の issue をすべて見る
似ている issue
-
enhancement language
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
pngwn/twinkleplop#178 ·
-
Type: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
resend/react-email#3889 ·
メンテナーはふだん 1 日以内に返信
-
build P3
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
maniator/verticopolis#1945 ·
メンテナーはふだん 1 日以内に返信
-
Admin users page number stays stale after filtering対応中かも @matthewxkong が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
feature request needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100